Cannot read property '_options' of undefined
See original GitHub issueHello, 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.<anonymous> (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 :
No Icon (input field only):
<div class="container">
<div class="row">
<div class="col-sm-6">
<input type="text" class="form-control datetimepicker-input" id="datetimepicker5" data-toggle="datetimepicker" data-target="#datetimepicker5"/>
</div>
</div>
</div>
Javascript :
console.log(notAvailableVar);
$(function () {
$('#datetimepicker5').datetimepicker();
});
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:21
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'options' of undefined
Your problem is that element.config is undefined . You can either go with Basem's anwser ( ...
Read more >Javascript error "Cannot read property 'options' of undefined"
Problem/Motivation I had this javascript error on a page where entity browser is used (as a dialog) : Uncaught TypeError: Cannot read ...
Read more >TypeError: Cannot read property 'options' of undefined #599
Expected behavior No exceptions Actual behavior Daily, but fairly low rate of TypeError: Cannot read property 'options' of undefined ...
Read more >Uncaught type error cannot read property options for undefined
I'm trying to get the selected value of the dropdown in javascript so I can test this value and fill the contents of...
Read more >Uncaught TypeError: Cannot read property ... - Google Groups
Uncaught TypeError : Cannot read property 'options' of undefined. Seems to be line 87 of the "jquery.fileupload-ui.js" file, which reads:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
try this
then add this code(JS)
$(.datepickers).datetimepicker({});
hope can help 😃
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.