diff --git a/Radzen.Blazor/QueryableExtension.cs b/Radzen.Blazor/QueryableExtension.cs index 06b1ea08905..48e0f0c43dd 100644 --- a/Radzen.Blazor/QueryableExtension.cs +++ b/Radzen.Blazor/QueryableExtension.cs @@ -787,7 +787,8 @@ internal static string GetColumnODataFilter(RadzenDataGridColumn column, o else if (column.FilterPropertyType == typeof(DateTime) || column.FilterPropertyType == typeof(DateTime?) || column.FilterPropertyType == typeof(DateTimeOffset) || - column.FilterPropertyType == typeof(DateTimeOffset?)) + column.FilterPropertyType == typeof(DateTimeOffset?) || + column.FilterPropertyType == typeof(DateOnly?)) { if (columnFilterOperator == FilterOperator.IsNull || columnFilterOperator == FilterOperator.IsNotNull) { @@ -799,7 +800,7 @@ internal static string GetColumnODataFilter(RadzenDataGridColumn column, o } else { - return $"{property} {odataFilterOperator} {DateTime.Parse(value, CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.RoundtripKind).ToString("yyyy-MM-ddTHH:mm:ss.fffZ", CultureInfo.InvariantCulture)}"; + return $"{property} {odataFilterOperator} {(column.FilterPropertyType == typeof(DateOnly?) ? value : DateTime.Parse(value, CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.RoundtripKind).ToString("yyyy-MM-ddTHH:mm:ss.fffZ", CultureInfo.InvariantCulture))}"; } } else if (column.FilterPropertyType == typeof(Guid) || column.FilterPropertyType == typeof(Guid?))