Skip to content

Preserve date when switching mode in RB DateNavigator - #6817

Merged
ThiefMaster merged 2 commits into
indico:masterfrom
tomasr8:rb-keep-day
Mar 26, 2025
Merged

Preserve date when switching mode in RB DateNavigator#6817
ThiefMaster merged 2 commits into
indico:masterfrom
tomasr8:rb-keep-day

Conversation

@tomasr8

@tomasr8 tomasr8 commented Mar 24, 2025

Copy link
Copy Markdown
Member

More context in INC4379609

This is the component in question (e.g. on /rooms/calendar):
image

Currently, when changing e.g. from the day mode to a week mode, the date changes as well. If the date is in the middle of the week and we select the 'week' mode, the date is changed to the start date of the week.

This means that for example selecting 'day' ->
'week' -> 'day' will not return to the same date which is surprising.

This PR makes it so that the date does not change when the view changes. This means that 'day' -> 'week' -> 'day' returns to the same date.

Comment thread indico/modules/rb/client/js/common/timeline/DateNavigator.jsx
Currently, when changing e.g. from the day mode to a
week mode, the date changes as well. If the date is
in the middle of the week and we select the 'week' mode,
the date is changed to the start date of the week.

This means that for example selecting 'day' ->
'week' -> 'day' will not return to the same date which
is surprising.

This PR makes it so that the date does not change when
the view changes. This means that 'day' -> 'week' ->
'day' returns to the same date.
@ThiefMaster ThiefMaster added this to the v3.3 milestone Mar 26, 2025
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.

3 participants