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

16 lines
505 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 { DateInput } from './DateInput';
import { STANDARD_DATE_AND_TIME_FORMAT } from './helpers/date';
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
/>
);