sumcumo / vue-datepicker

A datepicker Vue component. Compatible with Vue 2.x.
https://sumcumo.github.io/vue-datepicker/
Apache License 2.0
75 stars 22 forks source link

Typeable datepicker with v-model: only fire input event when selected (amended) #153

Closed mst101 closed 2 years ago

mst101 commented 2 years ago

As discussed in #151, currently input and selected events do the same thing (as you can see from these 3 commits)...

Going forward, I think we should just emit an input event, so that instead of writing:

<input type="date" />
<input type="date" value="someDate" oninput="doSomething" />

... users can write:

<Datepicker v-model="someDate" />
<Datepicker :value="someDate" @input="doSomething" />

As previously mentioned, I think we should also get rid of selectedDate internally and use value instead.

mst101 commented 2 years ago

Closing this - let's continue the discussion in #151.