-
-
Notifications
You must be signed in to change notification settings - Fork 56
feat(datepicker): Added a "week" date picker type #666
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
Conversation
...lects all dates which are in the same week as the date depending on the firstDayOfWeek prop.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/arthurdenner/react-semantic-ui-datepickers/56mry3mFbygyAe7qKShFfHqvjM5y
✅ Preview: https://react-semantic-ui-datepickers-git-fork-qwyt-b07c85-arthurdenner.vercel.app
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Uh oh!
There was an error while loading. Please reload this page.
This is a new feature. I've needed support for selecting a full week for a given date instead of an arbitrary range. Thought this might also be useful for others considering that various date picker libraries also support this.
What is the new behavior?
When picker property "type" is set to "week" hovering on a single date will highlight the full week that date belongs to (adhering to specified 'firstDayOfWeek' value).
Selecting a week this way will select all the dates in the week as opposed to the just the last and first dates as in the range date picker (see attached screenshot). This seemed more intuitive to me; i.e. if an user click on Wednesday only having Mon, Sun directly selected and just highlighting the days in between felt strange to me (also I needed a full list of dates in my use case anyway..). If others disagree I can make this behave the same way as the "range" picker.
Checklist:
No documentation, tests or support for locales other than 'en-US' will add that in an updated PR (assuming that you agree that this feature should be added at all
Untitled 4
).