1.3.0 • Published 2 years ago

@illa-design/calendar v1.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Calendar

The Calendar component is a container for displaying dates in calendar form.

Installation

yarn add @illa-design/calendar

Import component

import { Calendar } from "@illa-design/calendar"

API

Calendar Basic Properties

PropsDescTypeDefault
allowSelectWhether to allow selection and switching of datesboolean-
panelWhether to display in a containerboolean-
panelWidthThe width of the card modenumber | string265
panelTodayBtnWhether to show the jump to today buttonboolean-
panelOperationsAction button in panel modeArray<"left" | "right" | "doubleLeft" | "doubleRight">-
dayStartOfWeekThe first day of the week starts on, 0 - Sunday, 1 - Monday0 |10
defaultModeCalendar for selected date, month and year"day" | "month"| "year""month"
modeCalendar for selected date, month and year"day" |"month"|"year"-
disabledDateDisabled date(current?: Dayjs) => boolean-
dateRenderCustom date display(currentDate: Dayjs) => ReactNode-
monthRenderCustom month display(currentDate: Dayjs) => ReactNode-
dateInnerContentCustomize the date cell(currentDate: Dayjs) => ReactNode-
headerRenderCustom header render(props: {value?: Dayjs;pageShowDate?: Dayjs;mode?: string;onChange;onChangePageDate;onChangeMode;}) => ReactNode-
localeInternational configurationRecord<string, any>-
headerTypeTwo types of header"button" |"select""button"

Calendar Events

PropsDescTypeDefault
onChangeCallback when date change(date: Dayjs) => void-
onPanelChangeCallback when panel date change(date: Dayjs) => void-

Examples

Basic usage

<Calendar />
defaultValue='2022-04-01' headerType='select'

Set panel calendar

<Calendar panel defaultValue={dayjs('2020-04-01')} panelTodayBtn style={{ marginRight: 50 }} />
<Calendar panel defaultValue='2020-03' mode='year' />
1.2.0

2 years ago

1.3.0

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.1.0

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.20

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.9

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago