C
C
cb77772021-03-04 14:46:23
JavaScript
cb7777, 2021-03-04 14:46:23

How to format date in PrimeNg filter?

Good day. The project uses the PrimeNg package, the p-table component, the question arose of how to implement date filtering as in the documentation, so that you can select filter options, (contains, does not contain, etc.) for all types it works except date, since I have the date is used in the format dd.MM.yyyy, and the filter requires MM/dd/yyyy, which is why it does not work, currently the following filter is used:

<th class="ui-resizable-column" style="text-align: center"><input pInputText type="date" class="ui-column-filter" style='width:100%' (input)="dt.filter($event.target.value, 'FINE_ENTRDATE', 'contains')"></th>

But this does not suit the customer. How to make primeNg work with such a date?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question