MudDatePicker allows entering dates outside Min/MaxDate range when Editable is true
#3,461 opened on 2021/11/29
Repository metrics
- Stars
- (10,394 個のスター)
- PR merge metrics
- (平均マージ 6d 6h) (30d で 108 merged PRs)
説明
Bug type
Component
Component name
MudDatePicker
What happened?
Currently MudDatePicker with Editable="true" and with one of the following properties set: MinDate / MaxDate / FixYear / FixMonth / FixDay allows to enter incorrect values using keyboard.
I believe that it is a bug for MinDate and MaxDate properties, because for example MudNumericField.Min/Max obviously don't allow incorrect values. This is why I am reporting an error.
I don't know if it is a bug for FixYear, FixMonth, and FixDay properties.
Note: Currently I categorized FixYear, FixMonth, and FixDay properties to the "Picker behavior" group. If it is a bug, then after it is fixed, the FixYear, FixMonth, and FixDay properties can be categorized to the "Validation" group. I categorized MinDate, and MaxDate to the "Validation" group. See https://github.com/MudBlazor/MudBlazor/pull/3413 pull request.
Expected behavior
The MinDate and MaxDate properties don't allow to enter incorrect values by keyboard.
Reproduction link
https://try.mudblazor.com/snippet/caQFlPGjqkazvvIW
Reproduction steps
- Open https://try.mudblazor.com/snippet/caQFlPGjqkazvvIW
- Enter an incorrect value using a keyboard
- The incorrect value is stored in
date1ordate2field.
Relevant log output
No response
Version (bug)
6.0.2
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Windows
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project's Code of Conduct