EnablePersistence not working

On the page reload, the data can't be load from the local storage

Code :

<SfDateRangePicker 
     ID="DateRangePickerID" 
     EnablePersistence="true" 
     TValue="DateTime?" 
     @bind-StartDate="@StartValue" 
     @bind-EndDate="@EndValue">
</SfDateRangePicker>

Stack trace :
Error: System.FormatException: String '20/04/2021 00:00:00' was not recognized as a valid DateTime.
   at System.DateTimeParse.Parse(ReadOnlySpan`1 s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
   at System.Convert.ToDateTime(String value, IFormatProvider provider)
   at System.String.System.IConvertible.ToDateTime(IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Syncfusion.Blazor.Internal.SfBaseUtils.ChangeType(Object dataValue, Type conversionType, Boolean isClientChange)
   at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)



2 Replies 1 reply marked as answer

JM Jeyanth Muthu Pratheeban Sankara Subramanian Syncfusion Team April 27, 2021 03:12 PM UTC

Hello Thiken, 
 
Greetings from Syncfusion support. 
 
We checked the reported issue and we considered as a defect in our end. The fix for the issue will be included in the patch release which is expected to be roll out on 19th May 2021. You can track the status of the issue using the below feedback link. 
 
 
We appreciate your patience until then. 
 
Thanks, 
Jeyanth. 



BC Berly Christopher Syncfusion Team May 19, 2021 10:21 AM UTC

Hi Thiken,    
  
Thanks for the patience.     
  
We are glad to announce that our latest release in the version 19.1.64 has been rolled out successfully and in that release, we have included the “Console error occurs when enabling EnablePersistence property if the system date format is not in US format”.  So, we suggest you upgrade our Syncfusion packages to the latest version to resolve this issue in your end.    
  
  
  
Regards, 
Berly B.C 


Marked as answer
Loader.
Up arrow icon