KendoUI DatePicker not returning date value

459 Views Asked by At

I'm using the MVC wrapper for the KendoUI DatePicker widget and I have a situation where if I enter in a date like this: 1/4/15, I'm unable to retrieve the value of the field via JavaScript i.e. I get a null value. However, if I enter 1/4/2015, the value is correctly retrieved.

Here's the JS code to get the value from the datepicker control:

$("#date").data("kendoDatePicker").value()

C# parses the 1/4/15 value correctly as 1/4/2015 so it is my hope that someone can show me how to get KendoUI's datepicker to:

a) recognize 1/4/15 as a valid date

b) and correctly parse 1/4/15 as 1/4/2015

0

There are 0 best solutions below