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

feat(datepicker): Added a "week" date picker type #666

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

qwyt
Copy link

@qwyt qwyt commented Oct 26, 2021

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:

  • Documentation
  • Tests
  • Ready to be merged

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
).

…lects all dates which are in the same week as the date depending on the firstDayOfWeek prop.
@vercel
Copy link

vercel bot commented Oct 26, 2021

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

@stale
Copy link

stale bot commented Apr 17, 2022

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.

@stale stale bot added the stale label Apr 17, 2022
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

Successfully merging this pull request may close these issues.

2 participants