Bugfix/Update start date from timestamp to date format (#3951)

update start date from timestamp to date format
This commit is contained in:
Henry Heng 2025-01-30 17:04:59 +00:00 committed by GitHub
parent 9a68b4b021
commit ad60140e38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
const [hardDeleteDialogProps, setHardDeleteDialogProps] = useState({})
const [chatTypeFilter, setChatTypeFilter] = useState([])
const [feedbackTypeFilter, setFeedbackTypeFilter] = useState([])
const [startDate, setStartDate] = useState(new Date().setMonth(new Date().getMonth() - 1))
const [startDate, setStartDate] = useState(new Date(new Date().setMonth(new Date().getMonth() - 1)))
const [endDate, setEndDate] = useState(new Date())
const [leadEmail, setLeadEmail] = useState('')
@ -701,7 +701,7 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
setFeedbackTypeFilter([])
setSelectedMessageIndex(0)
setSelectedChatId('')
setStartDate(new Date().setMonth(new Date().getMonth() - 1))
setStartDate(new Date(new Date().setMonth(new Date().getMonth() - 1)))
setEndDate(new Date())
setStats([])
setLeadEmail('')

View File

@ -197,7 +197,7 @@ const UpsertHistoryDialog = ({ show, dialogProps, onCancel }) => {
const closeSnackbar = (...args) => dispatch(closeSnackbarAction(...args))
const [chatflowUpsertHistory, setChatflowUpsertHistory] = useState([])
const [startDate, setStartDate] = useState(new Date().setMonth(new Date().getMonth() - 1))
const [startDate, setStartDate] = useState(new Date(new Date().setMonth(new Date().getMonth() - 1)))
const [endDate, setEndDate] = useState(new Date())
const [selected, setSelected] = useState([])
@ -297,7 +297,7 @@ const UpsertHistoryDialog = ({ show, dialogProps, onCancel }) => {
return () => {
setChatflowUpsertHistory([])
setStartDate(new Date().setMonth(new Date().getMonth() - 1))
setStartDate(new Date(new Date().setMonth(new Date().getMonth() - 1)))
setEndDate(new Date())
}