This is a migrated thread and some comments may be shown as answers.

Possible bug in kendo.ParseDate?

1 Answer 864 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 2
Iron
Iron
Veteran
John asked on 07 Jan 2021, 11:01 PM
I was expecting to get either null or a date object out of the parser, always.  However i discovered when we tried to parse the number 253 that you'll end up with this error:  Uncaught TypeError: e.indexOf is not a function at ... (where ... is the kendo file and location).

It seems to work ok if you .toString() everything.

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 12 Jan 2021, 01:17 PM

Hi John,

The kendo.parseDate method parses as a formatted string as a Date. Thus, you have to stringify the number before passing to the parseDate method. For further information, please refer to the docs:

I hope this helps.

Regards,


Georgi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Date/Time Pickers
Asked by
John
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Georgi
Telerik team
Share this question
or