mengxiong10 / vue2-datepicker

A datepicker / datetimepicker component for Vue2
https://mengxiong10.github.io/vue2-datepicker/index.html
MIT License
1.51k stars 405 forks source link

Default time value through v-model is not updating #685

Closed sathiyad closed 2 years ago

sathiyad commented 2 years ago

I tried to set time on load but it's not.

<date-picker
    type="time" id="start"
    :time-picker-options="startTimeOptions"
    v-model="start"
    value-type="time"
    format="hh:mm A"
></date-picker>

here's the start and startTimeOptions,

startTimeOptions:{start: '00:00',step: '00:15',end: '23:45',format: 'hh:mm A'},
start:'12:00' //(also tried with start:'12:00 AM' & start:{hh:'12',mm:'00',A : 'AM'})

But none of the above helps to update the value. At the same time after selecting time on the input, I could see the below value. Screenshot from 2022-01-26 13-13-39

However, it helps new Date() but after removing value-type!

mengxiong10 commented 2 years ago

value-type="HH:mm"