Calendar
Reusable Calendar
Example
import {Calendar, createStyles, useStyles, View} from '@lad-tech/mobydick-calendar';
export const CalendarWidget = () => {
const [styles] = useStyles(stylesFn);
return (
<View style={styles.container}>
<Calendar />
</View>
);
};
const stylesFn = createStyles(({spaces}) => ({
container: {
gap: spaces.Space16,
alignItems: 'center',
},
}));
Props
CalendarProps
Inherits CalendarProps.
onDateRangeChange
| Type |
|---|
| (dateRange: IDateRange) => void |
Works by clicking Apply and Cancel, if you need to record that you, for example, canceled the selected dates;
bottomView
| Type |
|---|
| ReactElement |
defaultLocale
| TYPE | DEFAULT |
|---|---|
| string | 'ru' |
isClear
| Type |
|---|
| boolean |
isShowToday
| TYPE | DEFAULT |
|---|---|
| boolean | true |
localeConfig
| Type |
|---|
| ILocaleConfig |
isPeriod
| TYPE | DEFAULT |
|---|---|
| boolean | false |
initialRange
| Type |
|---|
| IInitialDate |
dottedDates
| Type |
|---|
| Date[] |
maxLengthDateRange
| Type |
|---|
| number |