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

DateRangePicker3 with non-contiguous months does not accept custom formatters #6489

Closed
adidahiya opened this issue Oct 23, 2023 · 0 comments · Fixed by #6490
Closed

DateRangePicker3 with non-contiguous months does not accept custom formatters #6489

adidahiya opened this issue Oct 23, 2023 · 0 comments · Fixed by #6490

Comments

@adidahiya
Copy link
Contributor

Environment

  • Package version(s): datetime2 v2.2.1
  • Operating System: macOS
  • Browser name and version: Chrome

Code Sandbox

https://codesandbox.io/p/sandbox/suspicious-frost-vqy5dx?file=%2Fsrc%2FDatetimeExample.tsx%3A19%2C11

Steps to reproduce

Render <DateRangePicker3> or <DateRangeInput3> with contiguousCalendarMonths={false} and set dayPickerProps={{ formatters }}

Actual behavior

Custom formatters are not applied to caption component dropdowns

image

Expected behavior

Custom formatters are applied, just like they are for contiguous month date range pickers

image

Possible solution

Fix implementation of <DatePicker3Caption> to use the user-provided formatters sent through props

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

Successfully merging a pull request may close this issue.

1 participant