UNPKG

react-native-ethiopian-calendar

Version:

A react native calendar component which is mainly intended for applications which require Ethiopian calendar.

53 lines (52 loc) 1.37 kB
import React from 'react'; import type { SelectedDate, Theme } from 'src/types'; import type { LanguageCode, Mode } from '../utils/locals/types'; declare type Props = { /** * set to 'EC' or 'GC' to switch between Gregorian calendar & Ethiopian calendar. * the default value is EC * @type {Mode} */ mode?: Mode; /** * to change the language of days names and months names. * the default 'ENG' for Gregorian calendar & 'AMH' for Ethiopian calendar. * @type {LanguageCode} */ locale?: LanguageCode; /** * to override default style * * @type {Theme} */ theme?: Theme; /** * to hide switch mode & change language dropdowns. * * @type {boolean} */ hideHeaderButtons?: boolean; /** * a callback gets executed when date press event is fired. * */ onDatePress: (date: SelectedDate) => void; /** * a callback invoked on mode change. * */ onModeChange?: (mode: Mode) => void; /** * a callback invoked on language change. * */ onLanguageChange?: (language: LanguageCode) => void; /** * if this prop is not set, the calendar will start from current month. * ONLY GREGORIAN DATE * @type {Date} */ initialDate?: Date; }; export declare const Calendar: React.FC<Props>; export {};