-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable future and past dates #70
Comments
You can do this if you wrap vue-date-pick in a custom component and use the isDateDisabled function with two props isDisabled(date)
{
if (this.isDateDisabled(date))
return true
date = moment(date)
if (this.minDate !== null && date.isBefore(this.minDate))
return true
return this.maxDate !== null && date.isAfter(this.maxDate)
} At least this is how I solved it. |
This is a stupid and inconvenient solution. |
It worked for me, but feel free to find another less stupid solution. |
The
|
Hi
Currently we can only disable one type of date it seems using isDateDisabled
We need to disable access to past dates as well limit the selection to not after a certain date
Example:
Do not select past dates from today and only select up to 12/12/2020
Any way to do that?
Thank you
The text was updated successfully, but these errors were encountered: