Nan Dates in Firefox
JasonDimmick opened this issue · comments
pickmeup('.date').get_date(true) returning - Nan-Nan-Na
Calendar loading with Nan for all dates.
I don't see this behavior in Firefox Nightly, can you prepare a demo (https://github.com/nazar-pc/PickMeUp#contribution)?
The issue seems to be more with Firefox and what it accepts as dates. The set_date function must be set with a date that has been created with the Date(year, month, day) format. IE and Chrome are more forgiving.
Also, if you use a format with the control other than y-m-d the value returned by get_date() cannot be cast or used to create a Date object later.
BTW, great job! This is a very useful tool.
You can call get_date(false)
and get Date
object if needed.
set_date
accepts either proper Date
object or date in the configured format, just like returned by get_date(true)
. If this doesn't behave as advertised, please prepare a demo and I'll fix it.