Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Type definitions for react-native-modern-datepicker 1.0
// Project: https://github.com/HosseinShabani/react-native-modern-datepicker#readme
// Definitions by: Ankan002 <https://github.com/Ankan002>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { CSSProperties } from 'react';

export interface ModernDatepickerProps {
onSelectedChange?: (dateString: string) => void;
onMonthYearChange?: (dateString: string) => void;
onTimeChange?: (dateString: string) => void;
onDateChange?: (dateString: string) => void;
minimumDate?: string;
maximumDate?: string;
selectorStartingYear?: number;
selectorEndingYear?: number;
disableDateChange?: boolean;
isGregorian?: boolean;
mode?: 'datepicker' | 'calendar' | 'monthYear' | 'time';
minuteInterval?: 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30 | 60;
style?: CSSProperties;
current?: string;
selected?: string;
options?: {
backgroundColor?: string;
textHeaderColor?: string;
textDefaultColor?: string;
selectedTextColor?: string;
mainColor?: string;
textSecondaryColor?: string;
borderColor?: string;
defaultFont?: string;
headerFont?: string;
textFontSize?: number;
textHeaderFontSize?: number;
headerAnimationDistance?: number;
daysAnimationDistance?: number;
};
locale?: string
}

export default function(props: ModernDatepickerProps): JSX.Element;
export function getToday(): string;
export function getFormatedDate(date?: Date, format?: string): string;
Loading