@onesy/ui-react
Version:
UI for React
76 lines (75 loc) • 2.53 kB
TypeScript
import React from 'react';
import { OnesyDate } from '@onesy/date';
import { ILine } from '../Line/Line';
import { IColor, IPropsAny } from '../types';
import { ICalendarViewsView } from '../CalendarViews/CalendarViews';
export declare type TCalendarMonthValue = OnesyDate | [OnesyDate, OnesyDate];
export declare type TCalendarMonthCalendar = OnesyDate;
export declare type ICalendarMonthValuesValue = {
day: string;
month: string;
year: string;
inputModal: string;
input: string;
selected: OnesyDate;
date: OnesyDate;
previous: OnesyDate;
move: 'previous' | 'next';
};
export declare type TCalendarMonthValues = [ICalendarMonthValuesValue, ICalendarMonthValuesValue];
export declare type ICalendarMonth = Omit<ILine, 'onChange'> & {
value?: TCalendarMonthValue;
valueDefault?: TCalendarMonthValue;
onChange?: (value: TCalendarMonthValue) => any;
calendar?: TCalendarMonthCalendar;
calendarDefault?: TCalendarMonthCalendar;
onChangeCalendar?: (value: TCalendarMonthCalendar) => any;
colorSelected?: IColor;
selected?: Array<[OnesyDate, OnesyDate?]>;
onTimeClick?: (date: OnesyDate, view: ICalendarViewsView, event: MouseEvent) => any;
now?: boolean;
outside?: boolean;
range?: boolean;
weekStartDay?: 'Monday' | 'Sunday';
noTransition?: boolean;
offset?: number;
min?: OnesyDate;
max?: OnesyDate;
validate?: (value: OnesyDate) => boolean;
labels?: boolean;
dayNamesFull?: boolean;
valid?: (value: OnesyDate, version: 'day' | 'month' | 'year') => boolean;
renderDay?: (value: OnesyDate, props: any, day: any, outside: boolean) => React.ReactNode;
renderDayValue?: (value: number, date: OnesyDate, day: any) => any;
renderDayName?: (order: number) => any;
DayNameProps?: IPropsAny;
PaginationItemProps?: IPropsAny;
TransitionProps?: IPropsAny;
TransitionsProps?: IPropsAny;
};
export interface IDay {
value: number;
in: boolean;
dayWeek: number;
weekend: boolean;
today: boolean;
future: boolean;
is: {
start: boolean;
between: boolean;
end: boolean;
same: boolean;
selected: boolean;
outside: boolean;
fromSelected: boolean;
monthStart: boolean;
monthEnd: boolean;
selectedIndex: number;
selectedSame: boolean;
};
start: boolean;
end: boolean;
onesyDate: OnesyDate;
}
declare const CalendarMonth: React.FC<ICalendarMonth>;
export default CalendarMonth;