May i know how do i add button quickly filter show if date match today?
May i know how do i add button quickly filter show if date match today?
kitsontam
Posts: 5Questions: 3Answers: 0
on this example.
https://www.webslesson.info/2019/07/how-to-calculate-total-of-column-in-datatable-using-php-with-ajax.html
the above pic shown that i draw a red square that's what i want to have, and i am using this example with php. May i know how do i add button quickly filter show if date match today?
Answers
The article there uses server-side processing, so you would need to tell the server to apply the required filter. You could use
ajax.data
to send the extra parameter to the server which would tell it if the "Today" filter should be active or not.Details on how to create a custom button are available here.
Allan
Alan, would you mind give me an example? i am newbie for this.
This example shows how to create a custom button. One option might be to toggle a global boolean variable each time the button is clicked to indicate whether to filter by today or not.
This example shows how to use
ajax.data
as a function to send extra parameters to the server. Just send the boolean variable.Kevin