MudBlazor/MudBlazor

MudDateRangePicker ignores Required=true if DateFormat is set

Chiusa

#7708 aperta il 30 ott 2023

 (2 commenti) (0 reazioni) (0 assegnatari)C# (1631 fork)batch import
buggood first issue

Metriche repository

Star
 (10.394 stelle)
Metriche merge PR
 (Merge medio 6g 6h) (108 PR mergiate in 30 g)

Descrizione

Bug type

Component

Component name

MudDateRangePicker

What happened?

You can set some fields in a MudForm as required and MudBlazor doesn't consider the form as valid until the values is provided. That is also the case with MudDateRangePicker. However if you customize the MudDateRangePicker by adding DateFormat attribute, the value isn't required anymore.

The first form from the link works correctly and the button is enabled only after all values are provided. The second form enables the button after the name is provided

Expected behavior

Both forms work the same way regardless of DateFormat attribute

Reproduction link

https://try.mudblazor.com/snippet/QYwdFaHOmHKLqYUc

Reproduction steps

...

Relevant log output

No response

Version (bug)

6.11.0

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On what operating system are you experiencing the issue?

Linux

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct

Guida contributor