-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Date Range Picker with currentMonthCalendarPosition=2
shows wrong range in mobile
#15943
Comments
Hey @RicardoAlvesPaycritical 👋 I'm not able to reproduce the issue you described. The number of calendars displayed in a range picker has to be greater than or equal to the position of the current month. Recording.2024-12-19.181457.mp4I think we should improve the behavior for this prop so I'm adding it this issue to the board. |
currentMonthCalendarPosition=2
shows wrong range in mobile
Hello @noraleonte, Gravacao.de.Ecra.2024-12-19.174634.mp4Please find attached the video with the issue. As you can see, I select the range 1 November 2024 to 15 November 2024. As I selected it (visible at 00:00:08) the selected date range shows me I selected range 1 October 2024 to 15 October 2024. As soon I close the picker, It is visible that the range inside the input (00:00:14) is selected October instead of November. When I open it again (00:00:17) The range isn't visible in October bu in November instead. The code to reproduce the issue seems to be related to currentMonthCalendarPosition when it's value is 2. It is only reproduceable in mobile view. |
Hey @RicardoAlvesPaycritical |
Hello @noraleonte! My thing using Thanks! |
Hey @RicardoAlvesPaycritical |
Hello again @noraleonte, From what I checked,
To better understand our use case, which I think might be pretty common: Can I, somehow control this (even in a clunky way)? |
Steps to reproduce
You can see the demo not working here:
https://codesandbox.io/p/sandbox/competent-violet-jpck37
The issue lies within component. to reproduce:
Add DateRangePicker with currentMonthCalendarPosition = 2 to show past month:
<DateRangePicker currentMonthCalendarPosition={2} slots={{ field: SingleInputDateRangeField }} name="allowedRange" />
Select some range in mobile. The selected range will be in the month before the one you selected. For instance, if you select the from 1 December 2024 to 10 December 2024, the selected range will be 1 November 2024 to 10 November 2024. If you open it again, the visual range selected will be the correct range.
Current behavior
Range 1 November 2024 to 10 November 2024 will be selected.
Expected behavior
Range 1 December 2024 to 10 December 2024 should be selected
Context
No response
Your environment
No response
Search keywords: DateRangePicker
Order ID: 103809
The text was updated successfully, but these errors were encountered: