The data attributes are passed to datepicker as options date and format as demonstrated in fiddle.
Interestingly, the textual representation of the date above is changed after initializing the plugin to: 20.09.2001 15:00:00 See the similarity of the dates? I guess the plugin does the parsing wrong.
The aforementioned snippet works if year is changed to 2019.
Also changing the format to MMM DD, YYYY hh:mm:ss a makes the errors to go away and calendar works.
Looks like MM token in format is causing the trouble.
Error on init:
vendors~bootstrap~co…5d6338a0.chunk.js:2 Uncaught (in promise) SyntaxError: Invalid regular expression: /(^|\.)datetimepicker(\.|$)/: Stack overflow
at RegExp.test (<anonymous>)
at HTMLDocument.dispatch (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.v.handle (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLInputElement.<anonymous> (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Function.each (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at C.fn.init.each (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at C.fn.init.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at o.M._notifyEvent (vendors~dateTimePick…556b2ee5.chunk.js:2)
at o.M._setValue (vendors~dateTimePick…556b2ee5.chunk.js:2)
Errors on focus:
Uncaught TypeError: Cannot read property '_options' of undefined
at HTMLInputElement.<anonymous> (vendors~dateTimePick…556b2ee5.chunk.js:2)
at HTMLDocument.dispatch (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.v.handle (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.simulate (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.n (vendors~bootstrap~co…5d6338a0.chunk.js:2)
Uncaught SyntaxError: Invalid regular expression: /(^|\.)datetimepicker(\.|$)/: Stack overflow
at RegExp.test (<anonymous>)
at HTMLDocument.dispatch (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.v.handle (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLInputElement.<anonymous> (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Function.each (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at C.fn.init.each (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at C.fn.init.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at o.M._notifyEvent (vendors~dateTimePick…556b2ee5.chunk.js:2)
at o.M._setValue (vendors~dateTimePick…556b2ee5.chunk.js:2)
Error on losing focus:
Uncaught TypeError: Cannot read property '_options' of undefined
at HTMLInputElement.<anonymous> (vendors~dateTimePick…556b2ee5.chunk.js:2)
at HTMLDocument.dispatch (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.v.handle (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.trigger (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at Object.simulate (vendors~bootstrap~co…5d6338a0.chunk.js:2)
at HTMLDocument.n (vendors~bootstrap~co…5d6338a0.chunk.js:2)
This is as far as I could get with jsfiddle but it, unfortunately, doesn't exhibit the problem. What are we doing wrong? Our version is: 5.1.2
When there is a particular date, the plugin just collapses.
The data attributes are passed to datepicker as options date and format as demonstrated in fiddle.
Interestingly, the textual representation of the date above is changed after initializing the plugin to:
20.09.2001 15:00:00
See the similarity of the dates? I guess the plugin does the parsing wrong.The aforementioned snippet works if year is changed to 2019.
Also changing the format to
MMM DD, YYYY hh:mm:ss a
makes the errors to go away and calendar works.Looks like
MM
token in format is causing the trouble.Error on init:
Errors on focus:
Error on losing focus: