aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/UserPage.jsx
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-09-04 10:53:05 -0700
committerAnton Tananaev <anton@traccar.org>2023-09-04 10:53:05 -0700
commit9a59d6524c45d5542433302a498f9ada4e45e806 (patch)
treeb779287db9104054ca5fbecf9f6218b2db46d8fe /modern/src/settings/UserPage.jsx
parent63eaa20047613c872979e2894fbdb5a0caab31f7 (diff)
downloadtrackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.tar.gz
trackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.tar.bz2
trackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.zip
Migrate to DayJs from moment
Diffstat (limited to 'modern/src/settings/UserPage.jsx')
-rw-r--r--modern/src/settings/UserPage.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/settings/UserPage.jsx b/modern/src/settings/UserPage.jsx
index 21859ea7..939859ae 100644
--- a/modern/src/settings/UserPage.jsx
+++ b/modern/src/settings/UserPage.jsx
@@ -19,7 +19,7 @@ import makeStyles from '@mui/styles/makeStyles';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import DeleteForeverIcon from '@mui/icons-material/DeleteForever';
import { useDispatch, useSelector } from 'react-redux';
-import moment from 'moment';
+import dayjs from 'dayjs';
import EditItemView from './components/EditItemView';
import EditAttributesAccordion from './components/EditAttributesAccordion';
import { useTranslation } from '../common/components/LocalizationProvider';
@@ -304,8 +304,8 @@ const UserPage = () => {
<TextField
label={t('userExpirationTime')}
type="date"
- value={(item.expirationTime && moment(item.expirationTime).locale('en').format(moment.HTML5_FMT.DATE)) || '2099-01-01'}
- onChange={(e) => setItem({ ...item, expirationTime: moment(e.target.value, moment.HTML5_FMT.DATE).locale('en').format() })}
+ value={(item.expirationTime && dayjs(item.expirationTime).locale('en').format('YYYY-MM-DD')) || '2099-01-01'}
+ onChange={(e) => setItem({ ...item, expirationTime: dayjs(e.target.value, 'YYYY-MM-DD').locale('en').format() })}
disabled={!manager}
/>
<TextField