Skip to content

Commit

Permalink
Bugfix/Update start date from timestamp to date format (#3951)
Browse files Browse the repository at this point in the history
update start date from timestamp to date format
  • Loading branch information
HenryHengZJ authored Jan 30, 2025
1 parent 9a68b4b commit ad60140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('')

Expand Down Expand Up @@ -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('')
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/views/vectorstore/UpsertHistoryDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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([])

Expand Down Expand Up @@ -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())
}

Expand Down

0 comments on commit ad60140

Please sign in to comment.