Ag-Grid Modify Date Filter Display

Ag-Grid Modify Date Filter Display

I use ag-grid on my Angular 4 app to display a table. In the date column, I use default date filter agDateColumnFilter as in the documentation. The placeholder shown in the filter input is always mm/dd/yyyy. Is it possible to change it to dd/mm/yyyy?

3 Answers

I currently have the same problem.

Since ag-grid uses input type="date" for its date filter it suffers from the restrictions mentioned here -> . I can only wonder what lead to the horrible decision not to let the display format be editable.

You can verify it by changing the browser's language.

The only solution I currently see is to implement a custom filter as described here ->

If you want somekind of popup calendar be aware that you might have to fiddle with ag-grid's CSS, most notably some overflow properties (on class ag-root for example) and I don't know what the effects this has on ag-grid.

we can do this with the moment

{headerName: "Updated at", field: "updated_at", hide: true, cellFormatter: function(data) {
    return moment(data.value).format('L');
}}

Refer this for further information

2

Use browserDatePicker: true in filterParams property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.