* set empty value when daterpicker meet textbox value '0000-00-00'.

This commit is contained in:
Catouse
2014-07-14 10:23:41 +08:00
parent 5dfcdd1661
commit b11c6c1db5
+1 -5
View File
@@ -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;
});
};