Skip to content

[Bug]: WeeklyDayPicker showing incorrect week number when navigating to different weeks #36721

Description

Package

react

Package version

8.125.6

React version

17.0.2

Environment

System:
    OS: Windows 11 10.0.26200
    CPU: (12) arm64 Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz
    Memory: 30.95 GB / 63.49 GB
  Browsers:
    Edge: Chromium (151.0.4129.107)

Current Behavior

In the WeeklyDayPicker, the week numbering inaccurately reflects the current week. Instead, the week number represents the start of the week.

Expected Behavior

The WeeklyDayPicker's sub-component, CalendarGridRow, should accurately parse the week number for the given week. The bug is in https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/CalendarDayGrid/CalendarGridRow.tsx. The bug doesn't reproduce for a full calendar view, only the weekly view.

Reproduction

https://codepen.io/alorodriguez/pen/NPprpqx

Steps to reproduce

  1. Create an instance of the WeeklyDayPicker/CalendarDayGrid/CalendarGridRow component.
  2. In a collapsed state, navigate forward/backward weeks in the CalendarDayGrid.
  3. Observe that the week numbering for the collapsed single-week view of the CalendarDayGrid is incorrect. It will incorrectly show the week number associated with the start of the month. Then, when you get to the next month, it will suddenly increment by 4. In other words, sub-weeks within a month are being represented with a week number that represents only the first week of that month.

Are you reporting an Accessibility issue?

None

Suggested severity

Urgent - No workaround and Products/sites are affected

Products/sites affected

Microsoft Outlook

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions