mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
Trigger changedatetime on blur if validate-on-blur is enabled
This commit is contained in:
parent
6e6e3f564a
commit
0687f4202a
@ -428,11 +428,13 @@
|
||||
.off('blur.xdsoft')
|
||||
.on('blur.xdsoft', function() {
|
||||
if( options.allowBlank && !$.trim($(this).val()).length ) {
|
||||
return true;
|
||||
$(this).val(null);
|
||||
}
|
||||
else if( !Date.parseDate( $(this).val(), options.format ) ) {
|
||||
$(this).val((new Date()).dateFormat( options.format ));
|
||||
}
|
||||
datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
|
||||
datetimepicker.trigger('changedatetime.xdsoft');
|
||||
});
|
||||
}
|
||||
options.dayOfWeekStartPrev = (options.dayOfWeekStart==0)?6:options.dayOfWeekStart-1;
|
||||
|
Loading…
Reference in New Issue
Block a user