search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Error parsing date

Asked by Marco
3 years ago.


I try to parse a date as following: DayPilot.Date.parse("2/27/2019", "M/d/yyyy");
This results in the following error:

daypilot-all.debug.js:4848 Uncaught TypeError: DayPilot.Date.fromYearMonthDay(...).daysInMonth is not a function
at a.parse (daypilot-all.debug.js:4848)
at Function.DayPilot.Date.parse (daypilot-all.debug.js:4340)
at <anonymous>:1:15

To make it more confusing, when I run the example listed here: everything works fine.

I tried multiple days in February and they all give the same error...

DayPilot Pro for JavaScript 2019.1.3531

Any help or suggestions is appreciated!


Comment posted by Dan Letecky [DayPilot]
3 years ago.

This sounds strange - I'm not able to reproduce it with the latest release. If you open and run the following in the JavaScript console, do you still see the error?

DayPilot.Date.parse("2/27/2019", "M/d/yyyy"); 
Answer posted by Marco
3 years ago.

Thanks for your reply Dan.

I updated the .js files to the latest version and now the issue seems to be resolved.


This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.