-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property '_options' of undefined #193
Comments
having the same issue here, did you find a solution? |
no :/ |
I Had this issue when it was a required field, and there was no data inside of the input. The error happened when i would use the call $.validator.unobtrusive.parse('form'). |
Has there been any update to this problem? |
+1 |
2 similar comments
+1 |
+1 |
The problem is on this line. Config needs a null check with a more informative error message: bootstrap-4/src/js/tempusdominus-bootstrap-4.js Line 1168 in 540bfae
|
If you do not use the jQuery plugin ( I am using the Could be worth refactoring to use |
Edited the library as suggested by @coltonf93 as shown below to stop getting _options when input was focused without icon. Hopefully, this fix will be included in the main branch soon. Still haven't found a fix for 'isSame' undefined errors when the date is deleted from the input box and datetimepicker is focused again. |
+1 |
just made a fork with the patch from tempusdominus#193 (comment) so i can use this repo in npm.
I was getting this issue today (version - 5.1.2) while working on one client request. It seems that if the input date is blank then it gives this error. I know it's better to fix that per other members but just putting here, if anybody wants it. HTML: |
Had an issue similar to this, where it kept saying cannot read property of undefined. Turned out I had accidentally included the library 2 times within that page (one in _Layout.html and one in my actual page.) |
having the same issue here |
try this
then add this code(JS) $(.datepickers).datetimepicker({}); hope can help :) |
@satriaWork comment worked for me. you should use the nearest div in selector . |
Thanks to your answer, I solved it. |
@satriaWork Thanks for the answer Side note: for those looking for just date alone without time, initialize your datetimepicker constructor as thus: $('#datetimepicker4').datetimepicker({ |
@satriaWork your answer is still actual
in my case early I had |
I had this same issue. I had to assign an id to the input-group (or div the datetimepicker is being applied to) to get around it -- even though the id isn't being used anywhere else. |
After checking this issue, again and again, mine finally got solved. The code in front of |
Hello,
For some reason, when there is one simple javascript error (not related with tempusdominus) this script generates one error when clicking in the input field to open the picker (No Icon demo used).
Error :
tempusdominus-bootstrap-4.js:2762 Uncaught TypeError: Cannot read property '_options' of undefined
at HTMLInputElement. (tempusdominus-bootstrap-4.js:2762)
at HTMLDocument.dispatch (jquery.js:5206)
at HTMLDocument.elemData.handle (jquery.js:5014)
at Object.trigger (jquery.js:8201)
at Object.simulate (jquery.js:8260)
at HTMLDocument.handler (jquery.js:8319)
HTML :
Javascript :
https://jsfiddle.net/seltix/vtfks15z/1/
The text was updated successfully, but these errors were encountered: