From 220c0688227a595166c49d7e4449ebe631ea78c2 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Mon, 9 Mar 2026 00:56:24 +0000 Subject: [PATCH] fix: Use formatDateTime instead of formatDate for nextDueDate in ChoreView The formatDate function was being called with a boolean (true) as the format parameter, which caused moment.js to throw 'format.match is not a function' error. Changed to use formatDateTime() which properly formats both date and time. --- src/views/ChoreEdit/ChoreView.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/ChoreEdit/ChoreView.jsx b/src/views/ChoreEdit/ChoreView.jsx index f9e6c77..d2cd20e 100644 --- a/src/views/ChoreEdit/ChoreView.jsx +++ b/src/views/ChoreEdit/ChoreView.jsx @@ -78,7 +78,7 @@ import TimerSplitButton from './TimerSplitButton.jsx' const ChoreView = () => { const { t } = useTranslation('chores') - const { formatDate } = useLocalization() + const { formatDate, formatDateTime } = useLocalization() const [chore, setChore] = useState({}) const navigate = useNavigate() const [performers, setPerformers] = useState([]) @@ -477,7 +477,7 @@ const ChoreView = () => { )} } size='md' sx={{ mb: 1 }}> {chore.nextDueDate - ? `${t('choreView.due')} ${formatDate(chore.nextDueDate, true)}` + ? `${t('choreView.due')} ${formatDateTime(chore.nextDueDate)}` : t('choreView.na')}