From c93f870c21370d4ef7a73fc8a0076a12e1e2b4a5 Mon Sep 17 00:00:00 2001 From: MarcoGoC Date: Wed, 19 Jun 2024 13:47:41 -0400 Subject: [PATCH] remove letters from year --- components/Forms/DatePicker.tsx | 2 ++ components/Layout/index.tsx | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Forms/DatePicker.tsx b/components/Forms/DatePicker.tsx index b22fbae4c..08353a2a0 100644 --- a/components/Forms/DatePicker.tsx +++ b/components/Forms/DatePicker.tsx @@ -131,7 +131,9 @@ export const DatePicker: React.FC = (props) => { type="number" min={props.minYear} max={props.maxYear} + pattern="[0-9]*" onChange={_onYearChange} + onKeyUpCapture={restrictNonNumbers} className="inputStyles" /> diff --git a/components/Layout/index.tsx b/components/Layout/index.tsx index 30a4b62a8..d5561ff52 100644 --- a/components/Layout/index.tsx +++ b/components/Layout/index.tsx @@ -18,8 +18,6 @@ export const Layout: React.VFC<{ const [prodEnv, setProdEnv] = useState(null) const isProduction = process.env.APP_ENV === 'production' - console.log(hostname, isProduction) - useEffect(() => { if (isProduction) { setProdEnv(hostname.includes('.alpha.service') ? 'alpha' : 'beta')