After calling Ext.Date.parse in JavaScript function, how to check whether the parsed date is valid?
var d = Ext.Date.parse(value, "c");
After calling Ext.Date.parse in JavaScript function, how to check whether the parsed date is valid?
var d = Ext.Date.parse(value, "c");
dt = Ext.Date.parse("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null
Parameters
input : String
The raw date string.
format : String
The expected date string format.
strict : Boolean (optional)
true to validate date strings while parsing (i.e. prevents JavaScript Date "rollover"). Invalid date strings will return null when parsed.
Defaults to: false