Skip to content

Comments

MudDateRangePicker: Implement ResetValueAsync for MudForm reset#12390

Merged
ScarletKuro merged 1 commit intoMudBlazor:devfrom
pwasilewski:feat/MudDateRangePicker-ResetValueAsync
Jan 5, 2026
Merged

MudDateRangePicker: Implement ResetValueAsync for MudForm reset#12390
ScarletKuro merged 1 commit intoMudBlazor:devfrom
pwasilewski:feat/MudDateRangePicker-ResetValueAsync

Conversation

@pwasilewski
Copy link
Contributor

@pwasilewski pwasilewski commented Jan 4, 2026

Description
MudDateRangePicker did not fully reset its value when used inside a form and the form was reset.
This was due to the component not overriding ResetValueAsync.

This PR adds an override for ResetValueAsync so the picker correctly clears its state when a form reset occurs.

Fix

  • Override ResetValueAsync in MudDateRangePicker to call ClearAsync.
  • Add a unit test to cover form reset behavior and prevent regressions.

Fixes #12113

Checklist:

  • I've read the contribution guidelines
  • My code follows the style of this project
  • I've added or updated relevant unit tests

Add support for clearing MudDateRangePicker when a form is reset. Updated FormResetTest to include a date range picker and added a unit test to verify that form.Reset() clears its value. Overrode ResetValueAsync in MudDateRangePicker to ensure proper reset behavior.
@mudbot mudbot bot added bug Unexpected behavior or functionality not working as intended tests Updating tests or test infrastructure is the primary focus and there are no changes the main library labels Jan 4, 2026
@ScarletKuro ScarletKuro merged commit bc17955 into MudBlazor:dev Jan 5, 2026
7 checks passed
@pwasilewski pwasilewski deleted the feat/MudDateRangePicker-ResetValueAsync branch January 5, 2026 07:35
This was referenced Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended tests Updating tests or test infrastructure is the primary focus and there are no changes the main library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When the form is reset, the MudDateRangePicker does not reset.

2 participants