EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: korenanzo on December 09, 2014, 03:43:50 AM



Title: datebox: format on blur
Post by: korenanzo on December 09, 2014, 03:43:50 AM
Hi all,
using datebox, if you exit  from the field using tab or click instead of enter then the data entered won't be  formatted.

How to fix it? could I call the formatter into the onBlur? how?

Thanks,
Ric


Title: Re: datebox: format on blur
Post by: stworthy on December 09, 2014, 08:15:41 AM
Call 'textbox' method to get the inputing box and you can bind any events on it.
Code:
var dt = $('#dt');
dt.datebox('textbox').bind('blur',function(){
var s = dt.textbox('getText');
dt.datebox('setValue', s);
});


Title: Re: datebox: format on blur
Post by: korenanzo on December 10, 2014, 01:21:59 AM
thanks