MudBlazor/MudBlazor

MudDatePicker allows entering dates outside Min/MaxDate range when Editable is true

開放

#3,461 建立於 2021年11月29日

 (2 則留言) (1 個反應) (0 位負責人)C# (1,631 個分叉)batch import
buggood first issue

倉庫指標

星標
 (10,394 顆星)
PR 合併指標
 (平均合併 6天 6小時) (30 天內合併 108 個 PR)

描述

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

  1. Open https://try.mudblazor.com/snippet/caQFlPGjqkazvvIW
  2. Enter an incorrect value using a keyboard
  3. The incorrect value is stored in date1 or date2 field.

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

貢獻者指南