update filter

This commit is contained in:
wayanrivan
2025-05-06 11:00:04 +07:00
parent 49f32883f7
commit c255e59733
4 changed files with 32 additions and 8 deletions

View File

@ -40,9 +40,9 @@ const ListToolbar = () => {
// useEffect to set the default date values
useEffect(() => {
const today = new Date();
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
// const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
settrxDate({
from: formatDate(firstDayOfMonth),
from: formatDate(today),
to: formatDate(today),
});
}, []);
@ -136,13 +136,13 @@ const ListToolbar = () => {
className="h-7.5"
onClick={() => {
const today = new Date();
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
// const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
// Resetting all filters
setSearchValue('');
setStatusApproval('');
settrxDate({
from: formatDate(firstDayOfMonth),
from: formatDate(today),
to: formatDate(today),
});