Hello, there is a bug somewhere in the datetime/date picker compoments which causes UI to freeze after you select date. After digging around I found out that cause of this is setting Min="DateTime.Now" rather than assigning it to a variable and using it in the component.
Not sure how far back it goes but version 20.1.0.56 was working fine, as I noticed this only after upgrading from that version to latest 20.4.0.38
Please fix this as I have few hundred components which needs updating because of this weird bug.
Working version:
<SfDatePicker @bind-Value="datepicker" Min="@MinDate" Placeholder="Select Date:" FloatLabelType="FloatLabelType.Always" />
@code {
DateTime MinDate = DateTime.Now;
}
Not working version:
<SfDatePicker @bind-Value="datepicker" Min=DateTime.Now Placeholder="Select Date:" FloatLabelType="FloatLabelType.Always" />
Also if Date picker component has ValueChanged property set for example I would like to validate selection and then depending on a result show a dialog - UI freeze for example (again this was working in 20.1.0.56):
<SfDateTimePicker Value="Model.NewDueDate" Readonly="Model.AssignedToContractorUserId == null" ValueChanged="ValidateNewDueDate" TValue="DateTime?" Min="minNewAllocationDate" Step="15" AllowEdit=false Placeholder="Set new arrival time:" FloatLabelType="FloatLabelType.Always" />
async Task ValidateNewDueDate(DateTime? newDueDate)
{
if (Some conditions are true)
{
//This is a prerendered SfDialog Compoment and a model simply represends data it should render on open. It also has a callbacks on button clicks
await ShowConfirmationDialog(new ConfirmationDialogModel()
{
.............
});
}
else
{
Model.NewDueDate = newDueDate;
StateHasChanged();
}
}
Hi Eimantas,
Thanks for your shared information. We have confirmed the reported issue is an issue at our end and this fix will be included in our any one of upcoming patch release,
You can track the status of this issue from the below feedback.
Feedback: https://www.syncfusion.com/feedback/40172
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization
Regards,
Sureshkumar P
Hi All,
We have fixed your reported issue from our end in the latest 20.4.43
version. So, we suggest you upgrade to our latest version to resolve the
current issue.
Find the release notes here: https://blazor.syncfusion.com/documentation/release-notes/20.4.43?type=all#datepicker
Regards,
Sureshkumar P