SamProf / MatBlazor

Material Design components for Blazor and Razor Components
http://www.matblazor.com
MIT License
2.84k stars 386 forks source link

DatePicker Date changes based on format #348

Open NPadrutt opened 4 years ago

NPadrutt commented 4 years ago

I have a Datepicker which is bound to the current date as in the documentation:

<MatDatePicker DateFormat="d.m.Y" @bind-Value="@Date1"></MatDatePicker>

image

When I now add DateFormat not just the format changes, but the whole date:

Format: d.m.Y image

Format: d.M.Y image

Format: Y.m.d image

So it seems that it only works when the year comes first. Do I make something wrong with the formatter or is there some kind of bug here?

NPadrutt commented 4 years ago

I tried it with the current DatePicker in the feature-forms-2.1 Branch and with the .net Format. That way it works as expected. So this can be closed when the branch is merged / released :)