Skip to content
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

Modifiers to match day of the week #330

Closed
5 tasks done
gpbl opened this issue May 6, 2017 · 0 comments
Closed
5 tasks done

Modifiers to match day of the week #330

gpbl opened this issue May 6, 2017 · 0 comments
Assignees
Milestone

Comments

@gpbl
Copy link
Owner

gpbl commented May 6, 2017

We can extend the type of modifiers to accept days of the weeks.

A common case is to match all the Sundays. This can be done using a function:

const sunday = day => day.getDate() === 0 
<DayPicker disabledDays={ sunday } />

Instead, we should be able to write:

// Disable Sundays
<DayPicker disabledDays={{ daysOfWeek: 0 }} />

// Disable Sundays and Saturdays
<DayPicker disabledDays={{ daysOfWeek: [0, 6] }} />
  • implement new modifier type
  • add unit tests
  • update docs
  • update examples
  • update typescript definitions file
@gpbl gpbl added this to the v5.5.0 milestone May 6, 2017
@gpbl gpbl self-assigned this May 6, 2017
@gpbl gpbl mentioned this issue May 9, 2017
@gpbl gpbl closed this as completed May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant