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

Error parsing date

Asked by Marco
5 years ago.

Hi,

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: https://api.daypilot.org/daypilot-date-parse/ 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!

Marco

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

This sounds strange - I'm not able to reproduce it with the latest release. If you open https://javascript.daypilot.org/demo/scheduler/ 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
5 years ago.

Thanks for your reply Dan.

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

Marco

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