@tchesa/react-native-modern-datepicker
Version:
A customizable calendar, time & month picker for React Native (including Persian Jalaali calendar & locale)
43 lines • 1.89 kB
TypeScript
import { Animated, StyleProp, ViewStyle } from 'react-native';
import moment, { Moment } from 'moment-jalaali';
import { ChangeMonthAnimationType, Configs, Mode } from './types';
declare class Utils {
data: {
minimumDate?: string;
maximumDate?: string;
isGregorian: boolean;
reverse?: boolean;
};
config: Configs;
constructor({ minimumDate, maximumDate, isGregorian, mode, reverse, configs, }: {
minimumDate?: string;
maximumDate?: string;
isGregorian: boolean;
mode?: Mode;
reverse?: true | false | 'unset';
configs?: Object;
});
get flexDirection(): StyleProp<ViewStyle>;
getFormated: (date: Moment, formatName?: 'selectedFormat' | 'dateFormat' | 'monthYearFormat' | 'timeFormat') => string;
getFormatedDate: (date?: Date, format?: string) => string;
getTime: (time: string) => string;
getToday: () => string;
getMonthName: (month: number) => string;
toPersianNumber: (value: string | number) => string;
toEnglish: (value: string) => string;
getDate: (time?: string) => moment.Moment;
getMonthYearText: (time: string) => string;
checkMonthDisabled: (time: string) => boolean;
checkArrowMonthDisabled: (time: string, next: boolean) => boolean;
checkYearDisabled: (year: number, next: boolean) => boolean;
checkSelectMonthDisabled: (time: string, month: string | number) => boolean;
validYear: (time: string, year: number) => string;
getMonthDays: (time: string) => any[];
useMonthAnimation: (activeDate: string, distance: number, onEnd?: () => void) => [{
lastDate: string;
shownAnimation: Animated.WithAnimatedObject<ViewStyle>;
hiddenAnimation: Animated.WithAnimatedObject<ViewStyle>;
}, (type: ChangeMonthAnimationType) => void];
}
export { Utils };
//# sourceMappingURL=Utils.d.ts.map