We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

can not binding to selection

i tride to binde to DateRangePicker with 2 way databinding withe value="@value"

and i get this errore:
Cannot read property 'dotnetInstance' of null
TypeError: Cannot read property 'dotnetInstance' of null
    at Object.compareValues (https://cdn.syncfusion.com/ej2/dist/ejs.interop.min.js:1:4788)
    at t.updateModel (https://cdn.syncfusion.com/ej2/dist/ejs.interop.min.js:1:2646)
    at t.startDate (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:7088)
    at merge (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:1237)
    at t.e.setProperties (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:427689)
    at t.clearModelvalue (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:1234075)
    at t.onPropertyChanged (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:1238609)
    at t.e.dataBind (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:428486)
    at t.dataBind (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:484801)
    at t.e.setProperties (https://cdn.syncfusion.com/ej2/dist/ej2.min.js:1:427749)


then i tride to binde to DateRangePicker with 

public Action<RangeEventArgs> Change { get; set; } 


but when change happened i get an error:


blazor.server.js:8 Uncaught (in promise) Error: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'startDate', line 1, position 30.
   at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsDateTime()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Syncfusion.EJ2.RazorComponents.Calendars.EjsDateRangePicker._InvokeChange(Object arg)
--- End of stack trace from previous location where exception was thrown ---

2 Replies

AB Ashokkumar Balasubramanian Syncfusion Team May 30, 2019 10:08 AM UTC

Hi Moshe Habas, 
 
Sorry for the inconvenience. 
 
Issue 1. While bind the change event to DateRangePicker it throws an console error. 
Issue 2. When clear the value it throws an console error like "TypeError: Cannot read property 'dotnetInstance' of null". 
 
We were able to replicate your reported problems in DateRangePicker component. We have considered this as a bug at our end and the fix will included on our upcoming patch release which is expected to be rolled out on today EOD (May 30,2019). You can track the status of those problems by using below feedback portal link. 
 
 
Please let us know, if you have any concern on this. 
 
Regards, 
Ashokkumar B. 



BC Berly Christopher Syncfusion Team May 31, 2019 11:22 AM UTC

Hi Moshe,  
Thanks for your patience.  
We have resolved your reported problem in our latest Blazor package release. You can use the latest (17.1.0.50-beta) Syncfusion.EJ2.AspNet.Core.RazorComponents Nuget package version and updated interop CDN file to get rid of the reported issue.  
Nuget Package: 
Regards, 
Berly B.C 


Loader.
Live Chat Icon For mobile
Up arrow icon