EasyUI Forum
May 16, 2024, 06:33:33 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: onChange for Datebox fired everytime I type a char  (Read 8210 times)
leela
Newbie
*
Posts: 29


View Profile Email
« on: May 23, 2014, 08:53:09 AM »

Hi,

  I have a datebox and I need to do some validation, when the user selects a date fromt he calendar or enters a value manually.
 I am using onSelect and onChange events. The problem is with onChange event being fired everytime I type a character. How can instruct it to fire it only after finish entering the value, or when i go to next field?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: May 23, 2014, 07:39:12 PM »

The 'onChange' event fires when any changes are applied to the datebox. In addition to this event, you can bind any other events to the input box to do what you want.
Code:
var input = $('#dd').datebox('textbox');  // get the text box object
input.bind('change', function(){
  //...
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!