Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.43k stars 142 forks source link

Disable all dates up to a given date #810

Closed Gilgard closed 5 months ago

Gilgard commented 5 months ago

Is your feature request related to a problem? Please describe. I often need to disable all past dates. As I can find the disabled dates prop is only a list of dates so to achieve this I would need a list of all dates dating back to when ever the calendar starts. generating that list would be annoying and unnecessary.

If this function already exists better docs for this would be nice

Describe the solution you'd like I would like to be able to disable all dates that are before a given date or at least a prop like disable-past-dates: boolean

Describe alternatives you've considered Update the prop to be like this?

disabled-dates: {
    to: Date,
    from: Date,
        dates: Date[]
}

Or to avoid breaking changes it is possible to add another prop like disable-dates-to

Jasenkoo commented 5 months ago

@Gilgard You can just set min-date prop