vue2-datepicker
vue2-datepicker copied to clipboard
[Bug] When disabled-date is specified, we can still select Year and Month
Vue2-datepicker version: 3.1.0 Vue version: 2.6.10 Browser: All
Steps to reproduce Add disabled date and click on the month or year button
Reproduction Link or Source Code https://jsfiddle.net/thd0b49w/
Expected behavior In the version 2 the month and year where disabled and not clickable
Actual behavior Even if every date in the month is disabled we can still click on it but cannot click on a day after that
Since the not-before
and not-after
are removed in v3.x.
It will be difficult to determine if the year is disabled.
Need to cycle every day of the year.
I consider adding props to implement this feature or built-in this feature
what can we use to replace not-before function, I need that
@iqbalme disabled-date
. https://mengxiong10.github.io/vue2-datepicker/index.html#DisabledDateTime
I want to disable date with multiple condition, let say i want to disable date before this month and after today? how can I do it?
disabledDat(date) {
return date < thisMonth || date > today;
},
wow, it works, thank you so much
disabledDat(date) { return date < thisMonth || date > today; },
Where to add this please?
@ohunayogege :disable-date="disableDate"
@ohunayogege
:disable-date="disableDate"
Thanks. Solved it since...
But input-class is giving error. "-" is not allowed
I would like to add to this: once can also manually enter a value as text input that falls into the disabled range.
I don't know, but I think it fits here. If you disable for example the weekends for the range selection. You can still select a wider range than the week. Would be nice to have some property to enable or disable the selection over disabled dates.