javascript - responsive total row with date range search

one text

I would like to do this when I search date range: the total amount and total profit will change depending on the date range you set and at the same time the content of the table also changes to the date range you set.

Actually its already working when you set a date range, the content of the table that you will see is depending on the date range you set because it is from datatables, however the total amount and total profit is the same as usual even though you set date range.

please see the images below.

enter image description here

enter image description here

I try the post method and it is working the total amount will set depending on date range you set, the problem is seeing all the records in the table not on the date range you set.

please see the image below.

enter image description here

Source