I have a form on a MudDialog that takes multiple dates and times from the user using MudDatePickers. I've found that upon adding the attribute PickerVariant="PickerVariant.Dialog" to them it now doesn't pick up the first value that is selected.
E.g. Upon opening the form I use the picker to select a date for the Start Date. Once selected the MudDatePicker closes but no text is displayed. If I go to the End Date MudDatePicker and select a date the text is updated immediately. Upon selecting the Start Date again I can see that the correct date is selected and finally it updates the text.
This is true no matter what is selected first or second.
Is this a known issue?? This was not an issue before adding the PickerVariant attribute so I can easily resolve this but I'd prefer to have the sleek look the PickerVariant.Dialog provides.
Made a VERY short version here that displays the same behaviour: https://try.mudblazor.com/snippet/mkGIkmOUdTexGCaK
Seems there are multiple issues already raised for this/similar behaviour.
Might not be what you're after but it works when you remove the Mask on the DatePickers.
No mask in DatePickers
<MudDatePicker @ref="_startDatePicker" @bind-Date="startDate" Label="Start Date*" PickerVariant="PickerVariant.Dialog" Color="Color.Primary" Margin="Margin.Dense" Variant="Variant.Outlined" Editable="true" DisableToolbar="true" AutoClose="true" DateFormat="dd/MM/yyyy" MinDate="minDate" MaxDate="maxDate">
<PickerActions>
<MudButton Class="mr-auto align-self-start" OnClick="@(() => _startDatePicker.Clear())">Clear</MudButton>
<MudButton OnClick="StartDateToday" Color="Color.Secondary">Today</MudButton>
</PickerActions>
</MudDatePicker>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With