import { getHours } from '@wojtekmaj/date-utils'; import Input from './Input.js'; import { safeMax, safeMin } from '../shared/utils.js'; type Hour24InputProps = { maxTime?: string; minTime?: string; value?: string | null; } & Omit, 'max' | 'min' | 'name' | 'nameForClass'>; export default function Hour24Input({ maxTime, minTime, ...otherProps }: Hour24InputProps): React.ReactElement { const maxHour = safeMin(23, maxTime && getHours(maxTime)); const minHour = safeMax(0, minTime && getHours(minTime)); return ; }