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

Full week selection #32

Closed
brunnolou opened this issue Apr 19, 2022 · 1 comment
Closed

Full week selection #32

brunnolou opened this issue Apr 19, 2022 · 1 comment

Comments

@brunnolou
Copy link

Is it possible to select full weeks?
If not, could you point out how such a feature could be implemented?

Something like this:

image

@uselessdev
Copy link
Owner

uselessdev commented Apr 19, 2022

Hi @brunnolou this is not possible for now, but if want to open a pull request I really appreciate it.

Also, if you need this urgently, you can do this by adding custom content (something like this https://uselessdev-datepicker.netlify.app/?path=/story/calendar--custom-content) or you can do this by setting the start and end dates by using startOfWeek and endOfWeek from date-fns.

maybe somethinf similar to this:

const handleDateChange = dates => {
  setDates({ start: startOfWeek(dates.start), end: endOfWeek(dates.start) })
}

*update:

The example above looks doesn't work properly so I just added a prop for week selection you can see this here and you can use this tag v2.4.0-rc

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

2 participants