Can't change the date format of grid filter

When I use a gridColumn with a DateOnly or DateTime type, the grid filter does not display the date format correctly. Moreover, the filtering does not work either

    
       <GridSortSettings>

                            <GridSortColumns>

                                <GridSortColumn Field="FeeReceivedDate" Direction="SortDirection.Descending"></GridSortColumn>

                            </GridSortColumns>

                        </GridSortSettings>

                        <GridPageSettings PageSize="20"></GridPageSettings>

                        <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>

                        <GridEditSettings ShowConfirmDialog="false" AllowEditing="IsEditable" AllowAdding="true" Mode="EditMode.Dialog">

                            <Template>

                                @{

                                    var dealFee = context as DealFee;

                                }

                                <NewDealFeeComponent @ref="newDealFeeComponentRef" DealFeeContent="dealFee" ShowValidationErrors="@ShowValidationErrors"></NewDealFeeComponent>

                            </Template>

                        </GridEditSettings>

                        <GridEvents TValue="DealFee"

                        OnActionFailure="OnActionFailure"

                        OnActionBegin="ActionBeginHandler"

                        RowSelected="OnRowSelected">

                        </GridEvents>

                        <GridColumns>

                            <GridColumn Field="Id" HeaderText="Id" Type="ColumnType.Date"

                            Format="MMMM dd, yyyy" Width="120" IsPrimaryKey="true" Visible="false"></GridColumn>

                            <GridColumn Field="@nameof(DealFee.FeeReceivedDate)"

                                    HeaderText="Received Date"

                                    Type="ColumnType.DateOnly"

                                    Format="MMMM dd, yyyy"

                                    Width="150"

                                    AllowFiltering="true">

                            </GridColumn>

                            <GridColumn Field="@nameof(DealFee.PayRunDate)" HeaderText="Payroll Run Date" Type="ColumnType.Date"

                            Format="MMMM dd, yyyy" Width="150"></GridColumn>


Attachment: Screenshot_20250721_142848_ee229091.png

2 Replies

PS Prathap Senthil Syncfusion Team July 22, 2025 11:38 AM UTC

Hi Julian Zayats.

Based on the reported problem, we are able to reproduce the issue when using the DateOnly type, as the checkbox filter format is not displaying correctly. We have confirmed that this is an issue and have logged a defect report titled. “Checkbox value display issue with DateOnly type in grid checkbox filtering” This fix will be included in our weekly patch release, which is expected to be rolled out on August 5th, 2025. You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    
 
Checkbox value display issue with DateOnly type in grid checkbox filtering in Blazor | Feedback Portal

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors, including but not limited to QA checks and work reprioritizatio.n”

We will get back to you once the release is rolled out. Thanks for your understanding.


However, we are unable to reproduce the problem with the DateTime type. For your reference, we have attached a simple sample and a screenshot. To further proceed with reporting the problem, we require some additional clarification from your end. Please share the following details with us to proceed

  • To analyze the reported issue effectively, could you please provide a simple, reproducible sample along with a backup file that demonstrates the problem? This will greatly assist us in identifying the issue more efficiently and providing a resolution.
  • Kindly share your attempt to replicate the issue using the attached simple sample.

Above-requested details will be very helpful in validating the reported query at our end and providing a solution as early as possible. Thanks for your understanding.


Sample: https://blazorplayground.syncfusion.com/embed/BjryZGBhWwxQNFlx?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5

Regards,
Prathap Senthil



PS Prathap Senthil Syncfusion Team August 7, 2025 12:42 PM UTC

Thanks for your patience,

We are glad to announce that, we have included the fix for the issue  “Checkbox value display issue with DateOnly type in grid checkbox filtering” in our 30.2.4 release.  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the NuGet package for the latest fixes and features below.


NuGet : https://www.nuget.org/packages/Syncfusion.Blazor.Grid

Relese notes: https://blazor.syncfusion.com/documentation/release-notes/30.2.4?type=all#data-grid

Root cause : The filtering logic in FilterCheckBoxRenderer.razor.cs did not account for the DateOnly, TimeOnly type. It only handled Date, DateTime, and DateTimeOffset, which led to incorrect or missing checkbox values when filtering columns of type DateOnly, TimeOnly.

Action Taken: Enhanced the checkbox rendering logic to support DateOnly:Added a condition to include ColumnType.DateOnly in the type check.Introduced formatting logic to convert DateOnly values to string using the column's format and current culture.Ensured consistent handling alongside other date types.This fix ensures that checkbox values are now correctly displayed for DateOnly, TimeOnly columns during grid filtering.



Loader.
Up arrow icon