Daterangepicker throwing error and crshing app

My app is .NetCore 5  I am developing blazor webassembly with Syncfusion components ver  v18.4.31 
When I try to use SfDateRangePicker picker with two way binding I am getting error and my app crash.
Error occurs on initial loading of page, before any user interaction 

Error I get looks like

    Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]

          Unhandled exception rendering component: Object reference not set to an instance of an object.

    System.NullReferenceException: Object reference not set to an instance of an object.

       at Syncfusion.Blazor.Calendars.SfDateRangePicker`1[[System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].UpdateIconState()

       at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.d__587[[System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()

       at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.d__541[[System.Nullable`1[[System.DateTime, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()

       at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()


Here is how my test page looks like

    @page "/test"
    @using Syncfusion.Blazor
    @using Syncfusion.Blazor.Calendars

     SfDateRangePicker Width="250px" StrictMode="true" AllowEdit="false" ShowClearButton="false" TValue="DateTime?" FirstDayOfWeek="1" @bind-StartDate="@OdDatuma" @bind-EndDate="@DoDatuma"
    DateRangePickerEvents TValue="DateTime?" OnClose="RangeSelectHandler">
 SfDateRangePicker
       
 
        @code {
            public DateTime? OdDatuma { get; set; } = DateTime.Now;
            public DateTime? DoDatuma { get; set; } = DateTime.Now;
            public void RangeSelectHandler(RangePopupEventArgs args)
            {
                Console.WriteLine(args.Date); 
            }
    }

Any tip what I am doing wrong?

Does this error is related with localization , In startup (Program.cs)  I do set culture to my local


        var cuif = new CultureInfo("hr_BA");
        cuif.NumberFormat.CurrencySymbol = "KM";

        cuif.DateTimeFormat.MonthNames = new string[] {"janar","februar","mart","april","maj","juni","juli","august","septembar","okotobar","novmbar","decembar","" };
        cuif.DateTimeFormat.AbbreviatedMonthNames = new string[] { "janar", "februar", "mart", "april", "maj", "juni", "juli", "august", "septembar", "okotobar", "novmbar", "decembar", "" };
        cuif.DateTimeFormat.AbbreviatedMonthGenitiveNames = new string[] { "janar", "februar", "mart", "april", "maj", "juni", "juli", "august", "septembar", "okotobar", "novmbar", "decembar", "" };

        CultureInfo.CurrentCulture = cuif;
        CultureInfo.CurrentUICulture = cuif;
        CultureInfo.DefaultThreadCurrentCulture = cuif;


Attachment: Counter_3e6fbe30.zip

3 Replies 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team December 29, 2020 01:01 PM UTC

Hi Admir, 

Greetings from Syncfusion support. 

We have considered the reported issue “Console error occurred when SfDateRangePicker with two way binding and the app get crashed in Web Assembly” as a bug in our end. The fix for the reported issue will be include in this weekly patch release which is scheduled on December 30, 2020. We appreciate your patience until then.    
     
You can track the status of the reported issue from the below feedback link.    

     
Regards,    
Ponmani M 



AH Admir Hodžic December 30, 2020 12:19 PM UTC

Thank you on fast response, Now it is working on ver 18.4.0.32


PM Ponmani Murugaiyan Syncfusion Team December 30, 2020 12:30 PM UTC

Hi Admir, 

Thanks for your patience. 

We are glad to announce that our Patch release V18.4.32 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 “Console error occurred when SfDateRangePicker picker with two way binding and the app get crashed in Web Assembly” 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