-
-
Notifications
You must be signed in to change notification settings - Fork 764
Closed
Description
It is very common for a date picker to work with selected and disabled days. While it is already possibile to implement disabled and selected modifiers, we could give them a special treatment to change the component's behavior. Example:
- if provided, they may add the
aria-selectedandaria-disabledattributes (see Add ARIA attributes for better accessibility #33) - the
disabledmodifier may also prevent to attach click or touchtap events to those days - we could implement them as prop (shortcut for the
modifiersprop):
// will add the `selected` modifier for the selected day
<DayPicker selected={ day => isSameDay(this.state.selectedDay) } />
// will add the `disabled` modifier to sundays
<DayPicker disabled={ day => day.getDate() === 6 } />Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels