Time picker sets default value on the form input but no v-model value when clicked
See original GitHub issueI’m submitting a …
[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe
Tell about your platform
- flatPickr version : 4.5.2
- Vue.js version : 3.0.5
- Browser name and version : Firefox 63.0.3
- This package version : 8.0.0
Current behavior
Time picker puts a default value (in my case 12:00) but no v-model
equivalent value when it is clicked.
Expected behavior
If time picker form is clicked there should be no default value put on the form. Or immediately set the v-model to the default value when it’s clicked.
Minimal reproduction of the problem with instructions I only set my flatpickr config to this:
enableTime: true,
noCalendar: true,
dateFormat: "U",
altInput: true,
altFormat: "h:i K",
And my flatpickr:
<flat-pickr v-model="myTime" class="input" placeholder="Time" :config="pickr.time"></flat-pickr>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
time value through v-model not updating on vue2-datepicker ...
I am using vue2-datepicker <date-picker type="time" id="start" :time-picker-options="startTimeOptions" v-model="start" value-type="time" ...
Read more >Form Timepicker | Components - BootstrapVue
BootstrapVue custom time picker input form control, which provides full WAI-ARIA accessibility (a11y) and supports internationalization (i18n).
Read more >Select | Quasar Framework
This component opens up a menu for the selection list and action. ... icon when a value (not undefined or null) is set;...
Read more >Inputs — Essentials ⚡️ FormKit — Vue Forms, Supercharged
The value prop should only be used for setting the initial value of an input. It will not react to changes after the...
Read more >How to set a default value to input with a v-model via HTML?
You need to assign your prop value to a data property and pass that data property to the v-model. Example. Copy Code //...
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 FreeTop 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
Top GitHub Comments
For anyone finding this. No need for a method. Just do:
<flat-pickr v-model=“date” :config=“config” @on-close=“date = $event” />
Another issue solution is use
watch
https://jsfiddle.net/zbrejkin/n84y65w0/13/