Skip to content

CalendarView: Selection, formatting, and timezone corrections #22973

@MartinZikmund

Description

@MartinZikmund

Phase 5 of CalendarView WinUI 3 parity upgrade

Parent tracking issue: (will be linked from epic)

Scope

Complete the selection model, formatting pipeline, and timezone handling.

Work items

  • Selection: Align CalendarView_Partial_Selection.cs with WinUI, particularly the OnSelectedDatesChanging validation flow and TrackableDateCollection change tracking
  • Format helpers: Align CreateDateTimeFormatter(), FormatWeekDayNames(), UpdateWeekDayNameAPName(), header text formatting with WinUI
  • Timezone: Verify InitializeIndexCorrectionTableIfNeeded() handles all edge cases (Samoa timezone, DST transitions) correctly across platforms
  • Header animation: Verify UpdateHeaderText(withAnimation) and ViewChanged/ViewChanging visual states
  • Scroll animation: Implement ScrollToDateWithAnimation() (currently missing - only non-animated scroll exists)

Files to modify

  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView_Partial_Selection.cs
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView_Partial.cs (format helpers)
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarView_Partial_TimeZone.cs
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarViewGeneratorMonthViewHost.cs (month label formatting)
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarViewGeneratorYearViewHost.cs (year label formatting)
  • src/Uno.UI/UI/Xaml/Controls/CalendarView/CalendarViewGeneratorDecadeViewHost.cs (decade label formatting)

WinUI source reference

  • dxaml/xcp/dxaml/lib/CalendarView_Partial_Selection.cpp
  • dxaml/xcp/dxaml/lib/CalendarView_Partial.cpp (formatting section)
  • dxaml/xcp/dxaml/lib/CalendarView_Partial_TimeZone.cpp
  • Generator host .cpp files

Dependencies

Phase 4

Risk & Testing

  • Risk: LOW-MEDIUM - formatting changes can cause locale-specific bugs but are isolated
  • Size: Small-Medium PR (~200-300 lines)
  • Testing: CalendarViewIntegrationTests locale-specific tests. Japanese/Arabic/Hebrew calendar tests. Samoa timezone scenario.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions