fix: filter date

This commit is contained in:
ferdiansyah783
2025-08-14 01:29:40 +07:00
parent 165c211c5b
commit 1d5ff78fc2
8 changed files with 74 additions and 30 deletions
@@ -13,7 +13,7 @@ import ReportHeader from '@/views/dashboards/daily-report/report-header'
import React, { useEffect, useRef, useState } from 'react'
const DailyPOSReport = () => {
const reportRef = useRef<HTMLElement | null>(null)
const reportRef = useRef<HTMLDivElement | null>(null)
const [now, setNow] = useState(new Date())
const [selectedDate, setSelectedDate] = useState(new Date())
@@ -21,7 +21,7 @@ const DailyPOSReport = () => {
startDate: new Date(),
endDate: new Date()
})
const [filterType, setFilterType] = useState('single') // 'single' or 'range'
const [filterType, setFilterType] = useState<'single' | 'range'>('single') // 'single' or 'range'
// Use selectedDate for single date filter, or dateRange for range filter
const getDateParams = () => {