mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
commit
bf8b1f5ec3
@ -199,6 +199,7 @@
|
||||
scrollInput:true,
|
||||
mask:false,
|
||||
validateOnBlur:true,
|
||||
allowBlank:false,
|
||||
yearStart:1950,
|
||||
yearEnd:2050,
|
||||
style:'',
|
||||
@ -417,8 +418,12 @@
|
||||
input
|
||||
.off('blur.xdsoft')
|
||||
.on('blur.xdsoft', function(){
|
||||
if( !Date.parseDate( $(this).val(), options.format ) )
|
||||
if( options.allowBlank && !$.trim($(this).val()).length ){
|
||||
return true;
|
||||
}
|
||||
else if( !Date.parseDate( $(this).val(), options.format ) ){
|
||||
$(this).val((new Date()).dateFormat( options.format ));
|
||||
}
|
||||
});
|
||||
}
|
||||
options.dayOfWeekStartPrev = (options.dayOfWeekStart==0)?6:options.dayOfWeekStart-1;
|
||||
|
Loading…
Reference in New Issue
Block a user