import React from 'react'; import moment from 'moment-timezone'; import { Validator, UseValidationProps } from '@interface-technologies/iti-react-core'; import { Placement } from '@floating-ui/utils'; /** This moment doesn't have to be a specific time zone. UTC is fine, for example. */ export type DateInputValue = moment.Moment | null; /** * @internal */ export declare function convertJsDateToTimeZone(date: Date, timeZone: string): Date; /** * @internal * * The offset of `date` must correspond to the browser's time zone for this to work. * * Example: * - assuming DST is in effect * - date = 9:00 am, UTC-4 = 1:00 pm UTC * - timeZone = America/Los_Angeles * - return value = 9:00 am, UTC -7 = 4:00 pm UTC */ export declare function parseJsDateIgnoringTimeZone(date: Date, timeZone: string): moment.Moment; declare function required(options: { includesTime: boolean; }): Validator; /** Validators for use with [[`DateInput`]]. */ export declare const DateValidators: { required: typeof required; }; export interface DateInputProps extends UseValidationProps { id?: string; placeholder?: string; className?: string; /** * This class name will be used **in addition to** `form-control` and the * validation feedback class. */ inputClassName?: string; popperPlacement?: Placement; includesTime?: boolean; displaySeconds?: boolean; isMilitary?: boolean; timeIntervals?: number; filterDate?(date: Date): boolean; enabled?: boolean; readOnly?: boolean; /** Pass `'local'` to use `moment.tz.guess()` as the time zone */ timeZone: string; } /** * A datetime input with a datepicker popover. See also [[`DateInputNoPicker`]]. * * It is implemented using `react-datepicker`. */ export declare const DateInput: React.NamedExoticComponent; export {};