Parse c# DateTime to Kendo DateTimePicker format

1.2k Views Asked by At

I was working on edit of a form. I had stored value returned from Kendo DateTimePicker into SQL Server with smalldatetime data type through DateTime of c#. Now while editing I want to display the stored data into the same DateTimePicker. I realized that c# returns date in the format of 2017-07-05T14:53:00 but Kendo DateTimePicker returns value in the format 7/20/2017 2:00AM. I am trying to set the value of Kendo DateTimePicker to the default value of the model. I have tried the following code but it is not working

kendo.parseDate("@Model.date", "dd-MM-yyyyTHH:mm:ss")

How do I do it?

0

There are 0 best solutions below