maxDate not working
Closed this issue · 2 comments
harrim4n commented
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
- Are you running the latest version?
- Are you reporting to the correct repository?
Bug Report
Environment
- Extension version(s): [e.g. v1.0.0, ...]
- Bulma version: 0.9.3
- OS: Linux
- Browser: Firefox 78.15.0esr (64-bit)
- How you are customizing the extension: none
Current Behavior
If maxDate is set (regardless of setting via options on attach or via data-max-date
), the calendar does not render.
Uncaught RangeError: Invalid time value
format http://localhost:8000/static/bulma/extensions/bulma-calendar.js:7352
a http://localhost:8000/static/bulma/extensions/bulma-calendar.js:59220
a http://localhost:8000/static/bulma/extensions/bulma-calendar.js:59219
refresh http://localhost:8000/static/bulma/extensions/bulma-calendar.js:58603
render http://localhost:8000/static/bulma/extensions/bulma-calendar.js:58692
_build http://localhost:8000/static/bulma/extensions/bulma-calendar.js:46512
_init http://localhost:8000/static/bulma/extensions/bulma-calendar.js:46403
bulmaCalendar http://localhost:8000/static/bulma/extensions/bulma-calendar.js:45925
attach http://localhost:8000/static/bulma/extensions/bulma-calendar.js:46900
attach http://localhost:8000/static/bulma/extensions/bulma-calendar.js:46898
Input Code
- Initialization code:
bulmaCalendar.attach('[type="date"],[type="datetime"],[type="time"]', {});
Possible Solution
The issue seems to have something to do with the assignment of var monthLabels = new Array(12)...
. This doesn't work, the values are invalid.
Reproducer
https://jsfiddle.net/tncuL3dh/
michael-hack commented
It seems, that this only happens with dates in the past. I'll have a look.
michael-hack commented
Fixed in 6.1.15