Skip to content

InputDate resets when typing 0 as day or month #43824

@stefangross

Description

@stefangross

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using the default InputDate the whole component resets its values when entering the month or day starting with "0".

Here is a link to a video showing the issue:

Expected Behavior

When entering month or day and using keyboard input "0" to start the the entry i would expect the component not to reset and allow me to continue to type the value, for example "05" for the month of May

Steps To Reproduce

  1. Use the default InputDate component bound to a date property
  2. Go the the page where the component is used. Start entering a year (2023 for example) press tab to go to month and start with typing the number zero.
  3. The component resets

Exceptions (if any)

none

.NET Version

6.0.400

Anything else?

PM> dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.400\

global.json file:
Not found

Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977

.NET SDKs installed:
6.0.400 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info

Metadata

Metadata

Assignees

Labels

Pillar: Technical DebtPriority:3Work that is nice to havearea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.feature-blazor-builtin-componentsFeatures related to the built in components we ship or could ship in the future

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions