aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/DevicePage.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/DevicePage.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/DevicePage.jsx')
-rw-r--r--modern/src/settings/DevicePage.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/settings/DevicePage.jsx b/modern/src/settings/DevicePage.jsx
index 11d122d3..435a48bd 100644
--- a/modern/src/settings/DevicePage.jsx
+++ b/modern/src/settings/DevicePage.jsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import moment from 'moment';
+import dayjs from 'dayjs';
import {
Accordion,
AccordionSummary,
@@ -137,8 +137,8 @@ const DevicePage = () => {
<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={!admin}
/>
<FormControlLabel