diff --git a/src/screens/UserPortal/Events/Events.tsx b/src/screens/UserPortal/Events/Events.tsx index caf1d72fd2..8453bd518d 100644 --- a/src/screens/UserPortal/Events/Events.tsx +++ b/src/screens/UserPortal/Events/Events.tsx @@ -65,6 +65,18 @@ export default function events(): JSX.Element { const [startTime, setStartTime] = React.useState('08:00:00'); const [endTime, setEndTime] = React.useState('10:00:00'); + const generateTimeOptions = (): string[] => { + const options: string[] = []; + for (let i = 0; i < 24; i++) { + for (let j = 0; j < 60; j += 15) { + const hour = i < 10 ? `0${i}` : `${i}`; + const minute = j < 10 ? `0${j}` : `${j}`; + options.push(`${hour}:${minute}:00`); + } + } + return options; + }; + const timeOptions = generateTimeOptions(); const organizationId = getOrganizationId(window.location.href); const modes = [t('listView'), t('calendarView')]; @@ -439,28 +451,46 @@ export default function events(): JSX.Element {