aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-12-21 07:23:57 -0800
committerAnton Tananaev <anton@traccar.org>2022-12-21 07:23:57 -0800
commit2f229a57b57a607f29d00ed4037bb82aab40baa1 (patch)
tree01c3f189c8a61f1cd85ce967da1082b14bdd1b79 /modern/src/settings
parenta5ae8c6cee71e56818bdcc67e5bf929cc07fe01d (diff)
downloadtrackermap-web-2f229a57b57a607f29d00ed4037bb82aab40baa1.tar.gz
trackermap-web-2f229a57b57a607f29d00ed4037bb82aab40baa1.tar.bz2
trackermap-web-2f229a57b57a607f29d00ed4037bb82aab40baa1.zip
Fix Arabic dates (fix #1067)
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/DevicePage.js2
-rw-r--r--modern/src/settings/UserPage.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/settings/DevicePage.js b/modern/src/settings/DevicePage.js
index 49f765a7..c84da42c 100644
--- a/modern/src/settings/DevicePage.js
+++ b/modern/src/settings/DevicePage.js
@@ -136,7 +136,7 @@ const DevicePage = () => {
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).format() })}
+ onChange={(e) => setItem({ ...item, expirationTime: moment(e.target.value, moment.HTML5_FMT.DATE).locale('en').format() })}
disabled={!admin}
/>
<FormControlLabel
diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js
index c5e5e258..9b69cacd 100644
--- a/modern/src/settings/UserPage.js
+++ b/modern/src/settings/UserPage.js
@@ -279,7 +279,7 @@ const UserPage = () => {
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).format() })}
+ onChange={(e) => setItem({ ...item, expirationTime: moment(e.target.value, moment.HTML5_FMT.DATE).locale('en').format() })}
disabled={!manager}
/>
<TextField