shlink-web-client/src/utils/dates/DateTimeInput.tsx

16 lines
506 B
TypeScript
Raw Normal View History

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';
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}
dateFormat={STANDARD_DATE_AND_TIME_FORMAT}
2022-10-18 23:02:09 +03:00
showTimeSelect
timeIntervals={10}
2022-10-18 23:02:09 +03:00
/>
);