move date to const date_format
This commit is contained in:
parent
bca7de2109
commit
d336558de2
@ -19,6 +19,15 @@ import {
|
|||||||
Toolbar,
|
Toolbar,
|
||||||
} from "react-admin";
|
} from "react-admin";
|
||||||
|
|
||||||
|
const date_format = {
|
||||||
|
year: "numeric",
|
||||||
|
month: "2-digit",
|
||||||
|
day: "2-digit",
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
second: "2-digit",
|
||||||
|
};
|
||||||
|
|
||||||
const validateToken = [regex(/^[A-Za-z0-9._~-]{0,64}$/)];
|
const validateToken = [regex(/^[A-Za-z0-9._~-]{0,64}$/)];
|
||||||
const validateUsesAllowed = [number()];
|
const validateUsesAllowed = [number()];
|
||||||
const validateLength = [number(), maxValue(64)];
|
const validateLength = [number(), maxValue(64)];
|
||||||
@ -67,14 +76,7 @@ export const RegistrationTokenList = props => {
|
|||||||
<DateField
|
<DateField
|
||||||
source="expiry_time"
|
source="expiry_time"
|
||||||
showTime
|
showTime
|
||||||
options={{
|
options={date_format}
|
||||||
year: "numeric",
|
|
||||||
month: "2-digit",
|
|
||||||
day: "2-digit",
|
|
||||||
hour: "2-digit",
|
|
||||||
minute: "2-digit",
|
|
||||||
second: "2-digit",
|
|
||||||
}}
|
|
||||||
sortable={false}
|
sortable={false}
|
||||||
/>
|
/>
|
||||||
</Datagrid>
|
</Datagrid>
|
||||||
|
Loading…
Reference in New Issue
Block a user