javascript - jQuery UI Datepicker getDate returns today's date on invalid date -
when using jquery ui's date-picker, if phone call getdate
while text in text box not valid date, getdate
returns today's date.
example
how can distinguish between today's date , invalid date when retrieving date?
looks normal behaviour widget. here's function includes back upwards invalid date checking:
/* gets current value * @return date result or null if no date nowadays * @throws if entered value invalid */ function getdate(datepicker) { datepicker = $(datepicker); var format = datepicker.datepicker("option", "dateformat"), text = datepicker.val(), settings = datepicker.datepicker("option", "settings"); homecoming $.datepicker.parsedate(format, text, settings); }
javascript jquery jquery-ui jquery-ui-datepicker
No comments:
Post a Comment