icehaunter / vue3-datepicker

Simple datepicker component for Vue 3
https://icehaunter.github.io/vue3-datepicker/
MIT License
150 stars 153 forks source link

can disabledDates option be a function ? #31

Closed pounard closed 3 years ago

pounard commented 3 years ago

This may sound like a stupid question, but one need I do have right now is the ability to disable all weekend (saturdays and sundays) in some calendars.

Is that possible ?

pounard commented 3 years ago

@Tcrussell436 nice thanks, but having a date filter function would also be a very good idea, for example we work with a client for which we do sometime compute allowed dates using french working days computation formula, with sometime client/business-specific additions to that formula.

Having a weekend filter is a good step forward, I like it, but I think it's not possible to cover all possible use case using utility options, having a user-given generic filter function here for developers to hook into would be a very good idea to make it future-proof.

Overall, using a generic user-given filter function mechanism, you could implement the weekend filter in a generic fashion.

icehaunter commented 3 years ago

Great request, should be very easy to add - contributions welcome!

icehaunter commented 3 years ago

Duplicate of #17