* set empty value when daterpicker meet textbox value '0000-00-00'.
This commit is contained in:
@@ -18,12 +18,8 @@ $(function()
|
||||
if($this.val() != '' && !$this.hasClass('form-time'))
|
||||
{
|
||||
var date = new Date($this.val());
|
||||
if(!date.valueOf()) date = new Date();
|
||||
|
||||
if($this.hasClass('form-datetime')) $this.val(date.format('yyyy-MM-dd hh:mm'));
|
||||
else $this.val(date.format('yyyy-MM-dd'));
|
||||
if(!date.valueOf()) $this.val('');
|
||||
}
|
||||
return $this;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user