diff --git a/src/settings/DevicePage.jsx b/src/settings/DevicePage.jsx index 8933a21055..de19af63a2 100644 --- a/src/settings/DevicePage.jsx +++ b/src/settings/DevicePage.jsx @@ -132,8 +132,12 @@ const DevicePage = () => { setItem({ ...item, expirationTime: dayjs(e.target.value, 'YYYY-MM-DD').locale('en').format() })} + value={item.expirationTime ? item.expirationTime.split('T')[0] : '2099-01-01'} + onChange={(e) => { + if (e.target.value) { + setItem({ ...item, expirationTime: new Date(e.target.value).toISOString() }) + } + }} disabled={!admin} /> { setExpiration(dayjs(e.target.value, 'YYYY-MM-DD').locale('en').format())} + value={expiration} + onChange={(e) => setExpiration(e.target.value)} />