question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default value on input (in HTML) causes datepicker to crash

See original GitHub issue

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" 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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
luckyrubycommented, Oct 24, 2018
1reaction
luckyrubycommented, Oct 24, 2018

I’m having the same issue. If I use an input-group though, it works.

https://codepen.io/luckyruby/pen/GYYwmZ

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found