Null Reference Exception when choosing a time

Hi,

when following the 2-way binding example for a TimePicker control (https://blazor.syncfusion.com/documentation/timepicker/data-binding/), if I select a time value from the drop down list, a System.InvalidOperationException occurs

System.InvalidOperationException: Nullable object must have a value.
   at System.Nullable`1.get_Value()
   at Syncfusion.Blazor.Calendars.SfTimePicker`1.OnParametersSetAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'mLZlx3tEfQ3hzRJu4vb-SINdZhwPtqlnY6_5GxQWNuA'.

2 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team October 5, 2020 02:20 PM UTC

Hi Jeremy, 

Thanks for contacting Syncfusion support. 

The reported issue is a know bug in our end and the fix will be included in upcoming patch release which is expected to be rolled out on October 6, 2020. Until then, we suggest you to use the below work-around solution “use the dummy events tag” to get rid of the reported issue.  

Once the fix included in the upcoming Nuget, you can remove the dummy events tag and check with your application with your reported issue. Please find the code snippet below for reference. 

<SfTimePicker TValue="DateTime?" @bind-Value="@DateValue"> 
    <TimePickerEvents TValue="DateTime?"></TimePickerEvents> 
</SfTimePicker> 
 
@code { 
    public DateTime? DateValue { get; set; } = new DateTime(2020, 10, 5, 10, 30, 0); 
} 

You can track the status of the bug in the below feedback link: 
 

Regards, 
Ponmani M 



PM Ponmani Murugaiyan Syncfusion Team October 7, 2020 05:00 AM UTC

Hi Jeremy,  

Thanks for your patience. 
   
We are glad to announce that our Patch release v18.3.0.38  has been rolled out. We thank you for your support and appreciate your patience in waiting for this release. The fix for the reported issue is included in the above release, kindly upgrade the Nuget to latest version. 


Please get in touch with us if you would require any further assistance.    

Regards,  
Ponmani M 


Marked as answer
Loader.
Up arrow icon