-1

I have date and amount fields that can be null in form submission. When I display these fields in details page with date and amount(0.00) using filters it throws
Invalid argument '0000-00-00 00:00:00' for pipe 'DatePipe' and Invalid argument '0.00' for pipe 'Number'

2 Answers2

0

Without seeing the actual form I can't help you debug it, but just a not about filters and pipes, they convert existing values.

I think your best bet is to make sure you have defaults for your date and whatever other amount you are filtering.

For example your date would default to today, and amount to zero, then the filter should work.

Good luck.

mikias
  • 416
  • 3
  • 10
-1

You can avoid this by using *ngIf:

Example:

Look at the code on the image

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135