vue2-datepicker: confirm: value doesn't change on "OK", if only year and/or month were changed
The month and year of a date cannot currently be changed alone (using the UI).
Steps to reproduce
<date-picker v-model="value" confirm />
- Choose a date, e.g. 2019-04-07.
- Choose a different year, e.g. 2020, and press “OK”.
- Date is still 2019-04-07.
- Choose a different month, e.g. 05, and press “OK”.
- Date is still 2019-04-07.
Expected result
It should be possible to change …
- the month without having to choose the day again.
- the year without having to choose the month (and the day) again.
Actual result
The changes are ignored unless day or month and day are chosen.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- feat: `select-year` and `select-month` (#290) — committed to mengxiong10/vue2-datepicker by mengxiong10 5 years ago
I added a prop
partial-update
implement this feature in ^3.0.2. https://codesandbox.io/s/partial-update-kc4k1?fontsize=14&hidenavigation=1&theme=darkIf you need to confirm the
select-year
https://codesandbox.io/s/vvz89oqno3