import React from 'react' import styles from './ModalDateTimeGroup.module.css' interface Props { label?: string helpIcon?: React.ReactNode dateValue: string hourValue: string minuteValue: string onDateChange: (value: string) => void onHourChange: (value: string) => void onMinuteChange: (value: string) => void timezone?: string className?: string } const ModalDateTimeGroup: React.FC = ({ label, helpIcon, dateValue, hourValue, minuteValue, onDateChange, onHourChange, onMinuteChange, timezone = 'GMT-7', className = '' }) => { // Generate hour options (00-23) const hours = Array.from({ length: 24 }, (_, i) => { const hour = i.toString().padStart(2, '0') return { value: hour, label: hour } }) // Generate minute options (00-59) const minutes = Array.from({ length: 60 }, (_, i) => { const minute = i.toString().padStart(2, '0') return { value: minute, label: minute } }) return (
{label && (
{helpIcon && ( )}
)}
onDateChange(e.target.value)} className={styles.dateInput} />
) } export default ModalDateTimeGroup