Blazor WebAssembly DateRangePicker OnClose event not working

Hi, 

I am trying to listen to OnClose event on SfDateRangePicker but it never fires.
I am using Blazor 18.4.0.39 version. Below, you can find the code sample.

Thanks,
Ahmet.

<SfDateRangePicker @ref="_dateRangePicker" TValue="DateTime?" 
Placeholder="Choose a Range"
AllowEdit="false">
<DateRangePickerEvents TValue="DateTime?" OnClose="OnCloseHandler"></DateRangePickerEvents>


</SfDateRangePicker>

@code {

private SfDateRangePicker<DateTime?> _dateRangePicker;

private void OnCloseHandler(RangePopupEventArgs args)
{
Console.WriteLine("OnClose");
_dateRangePicker.FocusOut();
}


}

3 Replies

PM Ponmani Murugaiyan Syncfusion Team February 1, 2021 11:32 AM UTC

Hi Ahmet, 

Greetings from Syncfusion support. 

Based on the provided code snippet, we have prepared sample and ensured with the mentioned version. The OnClose event of DateRangePicker component triggers as expected. Here we have attached the ensured sample and video demonstration for your reference. 



Kindly check with the above sample. If issue still exists, please revert us with issue replicating sample, replication procedure with video demonstration, which helps us to check and provide you the solution at earliest. 

Regards, 
Ponmani M 



AH Ahmet February 1, 2021 11:54 AM UTC

Hi Ponmani,

I had to be more specific. I am using Blazor WebAssembly with dotnet 5.

Attached is the sample application in which I still see the issue.

Attachment: BlazorTest_2dafd592.zip


PM Ponmani Murugaiyan Syncfusion Team February 2, 2021 01:22 PM UTC

Hi Ahmet, 

Thanks for the detailed information. 

We have considered the reported issue “Daterangepicker OnClose event is not triggered in .NET 5.0” as bug in our end. The fix will be included in upcoming patch release scheduled on February 10, 2021. You can track the status in the below feedback link. 


We appreciate your patience until then. 

Regards, 
Ponmani M 


Loader.
Up arrow icon