1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 | import { Dayjs, ConfigType } from 'dayjs';
|
6 |
|
7 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
8 | defaultValue?: any;
|
9 | onSelect?: any;
|
10 | onChange?: any;
|
11 | }
|
12 |
|
13 | export interface CalendarProps extends HTMLAttributesWeak, CommonProps {
|
14 | name?: string;
|
15 | |
16 |
|
17 |
|
18 | defaultValue?: ConfigType;
|
19 |
|
20 | |
21 |
|
22 |
|
23 | value?: ConfigType;
|
24 |
|
25 | |
26 |
|
27 |
|
28 | defaultPanelValue?: ConfigType;
|
29 |
|
30 | |
31 |
|
32 |
|
33 | shape?: 'card' | 'fullscreen' | 'panel';
|
34 |
|
35 | |
36 |
|
37 |
|
38 | onSelect?: (value: Dayjs, strVal: string) => void;
|
39 |
|
40 | |
41 |
|
42 |
|
43 | onChange?: (value: Dayjs, strVal: string) => void;
|
44 |
|
45 | |
46 |
|
47 |
|
48 | onPanelChange?: (value: Dayjs, mode: string) => void;
|
49 |
|
50 | |
51 |
|
52 |
|
53 | className?: string;
|
54 |
|
55 | |
56 |
|
57 |
|
58 | dateCellRender?: (value: Dayjs) => React.ReactNode;
|
59 |
|
60 | |
61 |
|
62 |
|
63 | monthCellRender?: (value: Dayjs) => React.ReactNode;
|
64 |
|
65 | |
66 |
|
67 |
|
68 | yearCellRender?: (value: Dayjs) => React.ReactNode;
|
69 |
|
70 | |
71 |
|
72 |
|
73 | disabledDate?: (value: Dayjs, mode: string) => boolean;
|
74 | }
|
75 |
|
76 | export default class Calendar extends React.Component<CalendarProps, any> {}
|