2023-02-18 12:40:37 +03:00
|
|
|
import type { FC } from 'react';
|
2023-02-18 13:11:01 +03:00
|
|
|
import type { ReactDatePickerProps } from 'react-datepicker';
|
2022-10-23 11:43:01 +03:00
|
|
|
import { STANDARD_DATE_AND_TIME_FORMAT } from '../helpers/date';
|
2023-02-18 13:11:01 +03:00
|
|
|
import { DateInput } from './DateInput';
|
2022-10-18 23:02:09 +03:00
|
|
|
|
|
|
|
export type DateTimeInputProps = Omit<ReactDatePickerProps, 'showTimeSelect' | 'dateFormat' | 'timeIntervals'>;
|
|
|
|
|
|
|
|
export const DateTimeInput: FC<DateTimeInputProps> = (props) => (
|
|
|
|
<DateInput
|
|
|
|
{...props}
|
2022-10-23 11:43:01 +03:00
|
|
|
dateFormat={STANDARD_DATE_AND_TIME_FORMAT}
|
2022-10-18 23:02:09 +03:00
|
|
|
showTimeSelect
|
2022-10-23 11:43:01 +03:00
|
|
|
timeIntervals={10}
|
2022-10-18 23:02:09 +03:00
|
|
|
/>
|
|
|
|
);
|