Flatpickr. On change wrong value
See original GitHub issuehttps://codepen.io/gamevnlc/pen/LYpbqEw
Your Environment
- flatpickr version used: 4.6.3
- Browser name and version: Chrome
- OS and version: MacOS 10.15.3
On change give incorrect datetime value when enableTime
is enable for the first time open picker
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Flatpickr. On change wrong value - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >Options - Flatpickr
Config Option Type Default
altFormat String "F j, Y"
altInput Boolean false
altInputClass String ""
Read more >onchange event is not woking on flatpickr() input
First change the order of your scripts: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <script ...
Read more >Flatpickr Vuejs Componet - Laracasts
I created Flatpickr Vuejs Component and it works fine but when I use static to ... el.children[1] }, /** * Watch for value...
Read more >vue-flatpickr-component - npm
Vue.js component for Flatpickr date-time picker. Latest version: 11.0.1, last published: ... You can change flatpickr value programmatically.
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
This is technically supposed to be the default behaviour.
You need to pass in the defaultDate yourself to make it use the current time. You can use simple JavaScript or any datetime wrapper like moment or Luxon -
defaultDate: new Date(),
You could also have defaultDate use a date coming from the database/any external source (useful in an “Edit” scenario) -
defaultDate: new Date(variableName)
Refer to https://flatpickr.js.org/options/ for other config options that you might need.