Skip to content

@bind and @bind-Value and @bind-Value for extra model behave different for datetime #40660

Description

@MarvinKlein1508

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Binding a datetime to an input in a blazor app is possible in this three ways. However way 1 and 2 result in a buggy user experience because the control will change it's values depending on the date the user inputs. Perhaps it has something todo with browser localisation. I have not tested it with another localisation besides de-de.

This gifs shows exactly what I mean:
date_bug

This happens in all major browsers. Firefox, Edge and Chrome.

Expected Behavior

All ways should behave like example 3.

Steps To Reproduce

  1. Load repo https://github.com/MarvinKlein1508/EdgeDateBindDemo
  2. Start the project
  3. Try to type into every control 10.02.2022

Exceptions (if any)

No response

.NET Version

6.0.201

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pillar: Technical DebtPriority:1Work that is critical for the release, but we could probably ship withoutarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions