MudBlazor/MudBlazor

MudTimePicker doesn't allow a typed space even though format is h:mm tt

开放

#10,131 创建于 2024年10月29日

 (3 条评论) (3 个反应) (0 位负责人)C# (1,631 个派生)batch import
buggood first issue

仓库指标

星标
 (10,394 个星标)
PR 合并指标
 (平均合并 6天 6小时) (30 天内合并 108 个 PR)

描述

Things to check

  • I have searched the existing issues for this bug
  • To rule out a caching problem I made sure the bug also happens in an incognito tab

Bug type

Component

Component name

MudTimePicker

What happened?

Setup MudTimePicker with Editable="true" TimeFormat="h:mm tt" and AmPm="true" . You cannot type in a space between the minutes and am/pm. You are unable to type in a valid date with the default time format. The base class MudPicker prevents a space from being entered.

Expected behavior

When the time format includes a space, and Editable is set to true, you are able to type in a space and enter a valid time.

Reproduction link

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

Reproduction steps

1.Setup MudTimePicker <MudTimePicker AmPm="true" Editable="true" TimeFormat="h:mm tt" @bind-Time="StartTime"/> 2. Clear out existing time and try to type in a new time Example - try to enter 10:00 AM, you cannot type in the space and it results in 10:00AM 3. Error is shown "Not a valid time span" and you cannot enter a valid time.

...

Relevant log output

No response

Version (bug)

7.14.0

Version (working)

n/a

What browsers are you seeing the problem on?

Firefox, Chrome, Edge, Safari

On which operating systems 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

贡献者指南