File tree Expand file tree Collapse file tree
apps/web/src/components/StartSessionForm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,10 +15,6 @@ import { z } from 'zod/v4';
1515
1616const currentDate = new Date ( ) ;
1717
18- // const EIGHTEEN_YEARS = 568025136000; // milliseconds
19-
20- //const MIN_DATE_OF_BIRTH = new Date(currentDate.getTime() - EIGHTEEN_YEARS);
21-
2218type StartSessionFormData = {
2319 sessionDate : Date ;
2420 sessionType : 'IN_PERSON' | 'RETROSPECTIVE' ;
@@ -184,17 +180,10 @@ export const StartSessionForm = ({
184180 . optional ( ) ,
185181 subjectDateOfBirth : z
186182 . date ( )
187-
188- // .max(MIN_DATE_OF_BIRTH, { message: t({
189- // en: `Subject must be above age of ${currentGroup?.settings.minimumAge}`,
190- // fr: `Le sujet doit être âgé de plus de ${currentGroup?.settings.minimumAge}`
191- // }) })
192183 . optional ( )
193184 . refine (
194185 ( date ) => {
195- // If there's no date picked or no limit defined, it's valid
196186 if ( ! date || ! MIN_DATE_OF_BIRTH ) return true ;
197- // Otherwise, ensure the date is not after the maximum allowed date
198187 return date <= MIN_DATE_OF_BIRTH ;
199188 } ,
200189 {
You can’t perform that action at this time.
0 commit comments