-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[datetime2] feat: DateRangePicker3 using react-day-picker v8 #6375
Conversation
progress on non-contiguous range pickerBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
fix lintBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
remove unused code; destructure propsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
export symbols in datetime public API for use in datetime2Build artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
packages/datetime2/src/components/date-input3/useFormattedDateString.ts
Outdated
Show resolved
Hide resolved
packages/datetime2/src/components/date-range-picker3/dateRangePicker3CaptionLabel.tsx
Outdated
Show resolved
Hide resolved
packages/datetime2/src/components/date-range-picker3/dateRangePicker3State.ts
Outdated
Show resolved
Hide resolved
minor cleanupBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
adjust some classes, fix some testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
[datetime] fix testsBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
fix lintBuild artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job. |
Related to #5652, #5699 - necessary to unblock React 18 support
Checklist
Changes proposed in this pull request:
Add new "v3" variant of DateRangePicker which uses react-day-picker v8.
Implementation notes:
disabledDays
modifier is no longer required, this is automatically handled by specifyingfromDate
andtoDate
(same goes for DatePicker3 which already merged)mode="range"
andnumberOfMonths={2}
. This works for single month range pickers and contiguous dual-month pickers.NonContiguousDayRangePicker
/ContiguousDayRangePicker
.Reviewers should focus on:
Screenshot
Single month picker (note the new location of prev/next month navigation buttons now that we delegate to rdp to render the caption):
Contiguous two month picker:
Non-contiguous two month picker: