Default value on input (in HTML) causes datepicker to crash
See original GitHub issueHi,
When I set a default value in the HTML input field (not with javascript):
<input type="text" **value="2018-07-02 09:13"** id="datetimepicker98" class="form-control datetimepicker-input" data-toggle="datetimepicker" data-target="#datetimepicker99" placeholder="YYYY-MM-DD HH:MM"/>
Then the datepicker crashes.
Here is a fiddle. Somehow, It doesn’t really crashes in the fiddle (the default date is not displayed), but it does crash in browsers.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
How to set input type date's default value to today?
Like any HTML input field, the browser will leave the date element empty unless a default value is specified within the value attribute....
Read more >Default value on input (in HTML) causes datepicker to crash -
Hi,. When I set a default value in the HTML input field (not with javascript): <input type="text" **value="2018-07-02 09:13"** id="datetimepicker98" ...
Read more >Bootstrap Datepicker deletes input fields default value
I'm using boostrap datepicker (I think), it works fine and dandy. However, -jquery loads a date into the input field when the page...
Read more >Setting default date value via civicrm_buildForm hook no ...
It is working - in part. When I examine the code I see that the default value is set. However, it is set...
Read more >Element: <oj-input-date> - Oracle Help Center
JET components are implemented as custom HTML elements and programmatic ... Default values for the datePicker sub-properties can also be ...
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
Commenting out https://github.com/tempusdominus/bootstrap-4/blob/master/build/js/tempusdominus-bootstrap-4.js#L388 gets it working for me.
I’m having the same issue. If I use an input-group though, it works.
https://codepen.io/luckyruby/pen/GYYwmZ