react-next-dates
Version:
Simple and Customizable DatePicker, DateRangePicker and TimePicker for React.
8 lines (7 loc) • 673 B
TypeScript
export declare function getDefaultDateFormat(locale: Locale, formatString?: string): string;
export declare function parseDate(value: string, formatString: string, locale: Locale): Date | null;
export declare function formatDate(date: Date, formatString: string, locale: Locale): string;
export declare function isDateInRange(date: Date, minDate?: Date, maxDate?: Date): boolean;
export declare function setTime(date: Date, dateWithTime: Date): Date;
export declare function setTimeOrRemoveTime(date: Date, dateWithTime?: Date | null): Date;
export declare function isRangeLengthValid(startDate: Date, endDate: Date, minLength: number, maxLength?: number): boolean;