buildDisabledPredicate
Calendar
stable
Factory that normalises the disabledDates prop (array of Date | string, or a custom predicate) into a single (date: Date) => boolean function consumed by calendar cell builders.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- inputrequisArray<Date | string> | ((d: Date) => boolean) | undefined
- Disabled dates as an array of Date / ISO string values, a custom predicate function, or undefined. When undefined, the returned predicate always returns false.
API
Valeur de retour
La valeur retournée par cet util.
- A single predicate that returns true for any date that should be disabled in the calendar.
Usage
Exemples
Extraits de code prêts à coller.
Disable specific dates from an array
Pass a custom predicate directly