Skip to content

Conversation

@BagavathiPerumal
Copy link
Contributor

Root cause

The issue was caused by incorrect handling of the month parameter when creating the DatePickerDialog. The month value from VirtualView?.Date was passed directly to the CreateDatePickerDialog method without adjusting for the difference in month indexing between the .NET framework (1-based) and Android's DatePickerDialog (0-based). This mismatch resulted in an incorrect month being displayed when navigating between months in the dialog.

Description of Issue Fix

The fix involves adjusting the month value passed to the DatePickerDialog in the CreatePlatformView method by subtracting 1 from the DateTime.Month value. This ensures compatibility with Android's 0-based month indexing, while maintaining correct behavior with the .NET framework’s 1-based month indexing, allowing the date to display correctly when navigating between months.

Tested the behavior in the following platforms.

  • Windows
  • Android
  • iOS
  • Mac

Issues Fixed

Fixes #25943

Output

Before Issue Fix After Issue Fix
DatePicker-BeforeFix.mp4
DatePicker-AfterFix.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 22, 2024
@BagavathiPerumal BagavathiPerumal marked this pull request as ready for review November 22, 2024 14:35
@BagavathiPerumal BagavathiPerumal requested a review from a team as a code owner November 22, 2024 14:35
@jsuarezruiz jsuarezruiz added the area-controls-datetimepicker DatePicker, TimePicker label Nov 22, 2024
@jsuarezruiz

This comment was marked as off-topic.

@azure-pipelines

This comment was marked as outdated.

@jsuarezruiz

This comment was marked as off-topic.

@azure-pipelines

This comment was marked as off-topic.

@jsuarezruiz

This comment was marked as off-topic.

@azure-pipelines

This comment was marked as outdated.

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Nov 27, 2024

/azp run

@azure-pipelines

This comment was marked as outdated.

@BagavathiPerumal

This comment was marked as off-topic.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/rebase

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis added this to the .NET 9 SR5 milestone Feb 14, 2025
@PureWeen PureWeen merged commit c458a44 into dotnet:main Feb 14, 2025
121 of 124 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-datetimepicker DatePicker, TimePicker community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Android] DatePicker Graphical Bug

7 participants