You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm using a DataGridDateColumn with a display format like this:
DisplayFormat="{0:dd-MMM-yyyy}"
If I type a date in that format in the filter text box , for instance 28-Mar-2024 it won't find anything , if i use the US format 3/28/2024 it will find a date.
Describe the solution you'd like
Would it be possible to apply a specific date format in the filter or let it use the displayformat already given? I know i can create a custom filter where this could be applied. Would be nice to get this working out of the box.
The text was updated successfully, but these errors were encountered:
The DisplayFormat parameter is used for the displaying of the cell value. If you want to have a different input format than the one that is provided by the DataGrid and by the browser you can override it by using the EditTemplate, FilterTemplate on a DataGridDateColumn.
Here is an example of a regular DataGridColumn. You can adopt the same logic for DataGridDateColumn.
I solved it by setting the date format on the application level in program.cs. If I set the short date there to dd-MMM-yyyy it works as expected. I want the user to be able to enter mar-2024 to get all march 2024 dates. By default my server is set to US format which is then used by the blazor application and the comparison fails.
I think in the filter you are ignoring the displayformat that is set on the column. I would expect that you first format the item text and then check if it contains the search value. A custom filter will also work but just generates unnecessary code.
Is your feature request related to a problem? Please describe.
I'm using a DataGridDateColumn with a display format like this:
DisplayFormat="{0:dd-MMM-yyyy}"
If I type a date in that format in the filter text box , for instance 28-Mar-2024 it won't find anything , if i use the US format 3/28/2024 it will find a date.
Describe the solution you'd like
Would it be possible to apply a specific date format in the filter or let it use the displayformat already given? I know i can create a custom filter where this could be applied. Would be nice to get this working out of the box.
The text was updated successfully, but these errors were encountered: