Skip to content

MudDatePicker: Retain specific DateTime.Kind when setting undefined kind#7564

Merged
henon merged 2 commits intoMudBlazor:devfrom
GRMagic:dev
Sep 30, 2023
Merged

MudDatePicker: Retain specific DateTime.Kind when setting undefined kind#7564
henon merged 2 commits intoMudBlazor:devfrom
GRMagic:dev

Conversation

@GRMagic
Copy link
Contributor

@GRMagic GRMagic commented Sep 27, 2023

Description

Fixes #7563

How Has This Been Tested?

Created a blank blazor webassembly app and reproduced the TryMudBlazor https://try.mudblazor.com/snippet/cOwdYNGLVhwGqZoq

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@github-actions github-actions bot added bug Unexpected behavior or functionality not working as intended PR: needs review labels Sep 27, 2023
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e3034ac) 90.56% compared to head (cb7ebcb) 90.58%.
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7564      +/-   ##
==========================================
+ Coverage   90.56%   90.58%   +0.01%     
==========================================
  Files         427      427              
  Lines       15216    15219       +3     
==========================================
+ Hits        13781    13786       +5     
+ Misses       1435     1433       -2     
Files Coverage Δ
...c/MudBlazor/Components/DatePicker/MudDatePicker.cs 90.97% <100.00%> (+0.13%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ScarletKuro
Copy link
Member

Hi. Thanks for PR. Can you add an bUnit test for this?

@ScarletKuro ScarletKuro requested a review from henon September 29, 2023 19:09
@henon henon changed the title When set a date with an undefined Kind, keep the old date Kind. MudDatePicker: Keep the DateTime Kind when setting date with undefined Kind Sep 30, 2023
@henon henon changed the title MudDatePicker: Keep the DateTime Kind when setting date with undefined Kind MudDatePicker: Retain specific DateTime.Kind when setting undefined kind Sep 30, 2023
@henon henon merged commit 160757e into MudBlazor:dev Sep 30, 2023
@henon
Copy link
Contributor

henon commented Sep 30, 2023

Thanks @GRMagic !

ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
…ind (MudBlazor#7564)

* When set a date with an undefined Kind, keep the old date Kind.

* Added an unit test for check MudDatePicker Date.Kind
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DatePicker set DateTime?.Kind to Unspecified

3 participants