From d336558de299aa70a45bc88a1c42ead1fd0f2119 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 3 Feb 2022 16:24:54 +0100 Subject: [PATCH] move date to `const date_format` --- src/components/RegistrationTokens.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/RegistrationTokens.js b/src/components/RegistrationTokens.js index 934262c..28213e5 100644 --- a/src/components/RegistrationTokens.js +++ b/src/components/RegistrationTokens.js @@ -19,6 +19,15 @@ import { Toolbar, } 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 validateUsesAllowed = [number()]; const validateLength = [number(), maxValue(64)]; @@ -67,14 +76,7 @@ export const RegistrationTokenList = props => {