Support for DateOnly type

Hi, are there any plans to support the use of the type DateOnly.

When I try to use the DatePicker with a field of type DateOnly I get the error below:

dbug: Microsoft.AspNetCore.Components.RenderTree.Renderer[3]
      Rendering component 4 of type Microsoft.AspNetCore.Components.Web.ErrorBoundary
Newtonsoft.Json.JsonSerializationException: Error converting value 17 to type 'System.DateOnly'. Path '', line 1, position 2.
 ---> System.ArgumentException: Could not cast or convert from System.Int64 to System.DateOnly.
   at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
   at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(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.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Syncfusion.Blazor.Internal.SfBaseUtils.ChangeType(Object dataValue, Type conversionType, Boolean isClientChange, Boolean isParseValue)
   at Syncfusion.Blazor.Calendars.SfDatePicker`1[[System.Nullable`1[[System.DateOnly, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ParseDate(String dateValue, String format)
   at Syncfusion.Blazor.Calendars.SfDatePicker`1.<StrictModeUpdate>d__318[[System.Nullable`1[[System.DateOnly, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Syncfusion.Blazor.Calendars.SfDatePicker`1.<OnInitializedAsync>d__298[[System.Nullable`1[[System.DateOnly, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()


3 Replies

R R November 8, 2021 07:44 PM UTC

It seems that all controls lack support for DateOnly and TimeOnly.



DR Deepak Ramakrishnan Syncfusion Team November 9, 2021 02:55 PM UTC

Hi Jaf santos, 
 
Greetings from Syncfusion support. 
 
We are currently validating the reported issue with provided details . We will update the possible details in two business days (11th,November 2021). 
We appreciate your patience until then. 
 
Thanks, 
Deepak R. 



DR Deepak Ramakrishnan Syncfusion Team November 11, 2021 03:17 PM UTC

Hi Jaf santos, 
 
We have validated your requirement with provided details and found that we currently don’t have the requested feature in the reported platform. Hence, we have considered this as a feature request in our end and this will be available in any of our upcoming future releases. we will consider the feature and implement in the certain release based on the customer request count and priority. So, we will intimate you once the road map has been prepared. You can track the status of the feature from the below feedback link. 
    
 


 
Regards,  
Deepak R.   


Loader.
Up arrow icon