import { endOfDay } from 'date-fns'; import DateInput from '../DateInput'; import { DateRange } from './types'; interface DateRangeRowProps extends DateRange { onStartDateChange: (date: Date | null) => void; onEndDateChange: (date: Date | null) => void; disabled?: boolean; } const DateRangeRow = ( { startDate = null, endDate = null, disabled = false, onStartDateChange, onEndDateChange }: DateRangeRowProps, ) => (
onEndDateChange(date && endOfDay(date))} />
); export default DateRangeRow;