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
gpbl opened this Issue May 6, 2017 · 0 comments

Comments

1 participant
@gpbl
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 the new feature label May 6, 2017

@gpbl gpbl added this to the v5.5.0 milestone May 6, 2017

@gpbl gpbl self-assigned this May 6, 2017

@gpbl gpbl referenced this issue May 9, 2017

Merged

Day week modifiers #336

@gpbl gpbl closed this May 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment