@gpa-gemstone/react-forms
Version:
React Form modules for gpa webapps
19 lines (18 loc) • 934 B
TypeScript
import * as moment from 'moment';
import { Gemstone } from '@gpa-gemstone/application-typings';
export type TimeUnit = ('datetime-local' | 'date' | 'time');
export interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
Valid: (field: keyof T) => boolean;
Feedback?: string;
Format?: string;
Type?: TimeUnit;
AllowEmpty?: boolean;
Accuracy?: Gemstone.TSX.Types.Accuracy;
MinDate?: moment.Moment;
}
/**
* Component that allows a user to pick a date or datetime.
*/
export default function DateTimePickerBase<T>(props: IProps<T>): JSX.Element;
export declare function getBoxFormat(type?: TimeUnit, accuracy?: Gemstone.TSX.Types.Accuracy): "YYYY-MM-DD" | "HH:mm" | "HH:mm:ss" | "HH:mm:ss.SSS" | "YYYY-MM-DD[T]HH:mm" | "YYYY-MM-DD[T]HH:mm:ss" | "YYYY-MM-DD[T]HH:mm:ss.SSS";
export declare const getInputWidth: (inputRef: HTMLInputElement, currentValue: string, currentStep: string) => number;