@rainbow-oh/yee-c 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Button/button.d.ts +1 -1
- package/dist/cjs/CSV/download.d.ts +1 -1
- package/dist/cjs/Carousel/carousel.d.ts +2 -2
- package/dist/cjs/Carousel/carousel.js +9 -2
- package/dist/cjs/Carousel/interface.d.ts +5 -0
- package/dist/cjs/Cascader/cascader.js +53 -62
- package/dist/cjs/Cascader/interface.d.ts +19 -2
- package/dist/cjs/Cascader/node.js +11 -6
- package/dist/cjs/Cascader/search-list.js +2 -1
- package/dist/cjs/Cascader/utils/index.d.ts +58 -14
- package/dist/cjs/Cascader/utils/index.js +57 -73
- package/dist/cjs/Drawer/style/index.less +4 -0
- package/dist/cjs/FloatButton/float-button.d.ts +1 -1
- package/dist/cjs/Form/demo/basic.js +2 -2
- package/dist/cjs/Form/style/index.less +15 -0
- package/dist/cjs/Input/style/index.less +19 -17
- package/dist/cjs/InputNumber/style/index.less +0 -29
- package/dist/cjs/PickerPanel/interface.d.ts +44 -2
- package/dist/cjs/PickerPanel/panels/DatePanel/DateBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DatePanel/DateHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DatePanel/DateHeader.js +1 -1
- package/dist/cjs/PickerPanel/panels/DatePanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DateTimePanel/index.d.ts +7 -1
- package/dist/cjs/PickerPanel/panels/DateTimePanel/index.js +18 -4
- package/dist/cjs/PickerPanel/panels/DecadePanel/DecadeBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DecadePanel/DecadeBody.js +1 -1
- package/dist/cjs/PickerPanel/panels/DecadePanel/DecadeHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DecadePanel/DecadeHeader.js +1 -1
- package/dist/cjs/PickerPanel/panels/DecadePanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/DecadePanel/index.js +1 -1
- package/dist/cjs/PickerPanel/panels/Header.d.ts +13 -1
- package/dist/cjs/PickerPanel/panels/MonthPanel/MonthBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/MonthPanel/MonthHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/MonthPanel/MonthHeader.js +1 -1
- package/dist/cjs/PickerPanel/panels/MonthPanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/MonthPanel/index.js +1 -1
- package/dist/cjs/PickerPanel/panels/PanelBody.d.ts +21 -1
- package/dist/cjs/PickerPanel/panels/PanelBody.js +3 -3
- package/dist/cjs/PickerPanel/panels/QuarterPanel/QuarterBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/QuarterPanel/QuarterHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/QuarterPanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/RangePanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/RangePanel/index.js +2 -2
- package/dist/cjs/PickerPanel/panels/RangePanel/interface.d.ts +5 -5
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeBody.d.ts +17 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeCell.d.ts +7 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeCell.js +1 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeColumn.d.ts +14 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeColumn.js +1 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/TimeHeader.d.ts +4 -1
- package/dist/cjs/PickerPanel/panels/TimePanel/index.d.ts +9 -1
- package/dist/cjs/PickerPanel/panels/WeekPanel/WeekBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/WeekPanel/WeekHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/WeekPanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/YearPanel/YearBody.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/YearPanel/YearBody.js +2 -2
- package/dist/cjs/PickerPanel/panels/YearPanel/YearHeader.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/YearPanel/YearHeader.js +7 -1
- package/dist/cjs/PickerPanel/panels/YearPanel/index.d.ts +2 -1
- package/dist/cjs/PickerPanel/panels/YearPanel/index.js +1 -1
- package/dist/cjs/PickerPanel/utils/pickerUtils.d.ts +7 -7
- package/dist/cjs/PickerPanel/utils/pickerUtils.js +2 -2
- package/dist/cjs/Popover/style/index.less +1 -0
- package/dist/cjs/Select/interface.d.ts +77 -0
- package/dist/cjs/Select/option.d.ts +2 -1
- package/dist/cjs/Select/option.js +6 -3
- package/dist/cjs/Select/options.d.ts +3 -2
- package/dist/cjs/Select/options.js +53 -47
- package/dist/cjs/Select/select.js +1 -1
- package/dist/cjs/Select/style/index.less +8 -13
- package/dist/cjs/Selector/interface.d.ts +4 -0
- package/dist/cjs/Selector/selector.js +3 -0
- package/dist/cjs/Selector/style/index.less +21 -137
- package/dist/cjs/Table/hooks/useFilter.js +1 -1
- package/dist/cjs/Table/interface.d.ts +4 -0
- package/dist/cjs/Table/style/index.less +2 -0
- package/dist/cjs/Table/theader/filter.js +2 -1
- package/dist/cjs/Tabs/demo/basic.js +8 -1
- package/dist/cjs/Tabs/tabs.js +3 -1
- package/dist/cjs/Tag/demo/checkable.js +1 -0
- package/dist/cjs/Tag/tag.js +1 -1
- package/dist/cjs/TextArea/style/index.less +0 -17
- package/dist/cjs/Trigger/trigger.js +1 -1
- package/dist/cjs/hooks/useEvent.js +4 -1
- package/dist/cjs/style/color.css +1 -1
- package/dist/cjs/style/size.css +11 -2
- package/dist/cjs/style/themes.css +1 -1
- package/dist/cjs/style/variables.css +13 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Button/button.d.ts +1 -1
- package/dist/esm/CSV/download.d.ts +1 -1
- package/dist/esm/Carousel/carousel.d.ts +2 -2
- package/dist/esm/Carousel/carousel.js +5 -1
- package/dist/esm/Carousel/interface.d.ts +5 -0
- package/dist/esm/Cascader/cascader.js +49 -56
- package/dist/esm/Cascader/interface.d.ts +19 -2
- package/dist/esm/Cascader/node.js +8 -11
- package/dist/esm/Cascader/search-list.js +2 -1
- package/dist/esm/Cascader/utils/index.d.ts +58 -14
- package/dist/esm/Cascader/utils/index.js +124 -75
- package/dist/esm/Drawer/style/index.less +4 -0
- package/dist/esm/FloatButton/float-button.d.ts +1 -1
- package/dist/esm/Form/demo/basic.js +4 -2
- package/dist/esm/Form/style/index.less +15 -0
- package/dist/esm/Input/style/index.less +19 -17
- package/dist/esm/InputNumber/style/index.less +0 -29
- package/dist/esm/PickerPanel/interface.d.ts +44 -2
- package/dist/esm/PickerPanel/panels/DatePanel/DateBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DatePanel/DateHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DatePanel/DateHeader.js +1 -1
- package/dist/esm/PickerPanel/panels/DatePanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DateTimePanel/index.d.ts +7 -1
- package/dist/esm/PickerPanel/panels/DateTimePanel/index.js +11 -7
- package/dist/esm/PickerPanel/panels/DecadePanel/DecadeBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DecadePanel/DecadeBody.js +2 -1
- package/dist/esm/PickerPanel/panels/DecadePanel/DecadeHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DecadePanel/DecadeHeader.js +2 -1
- package/dist/esm/PickerPanel/panels/DecadePanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/DecadePanel/index.js +1 -1
- package/dist/esm/PickerPanel/panels/Header.d.ts +13 -1
- package/dist/esm/PickerPanel/panels/MonthPanel/MonthBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/MonthPanel/MonthHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/MonthPanel/MonthHeader.js +2 -1
- package/dist/esm/PickerPanel/panels/MonthPanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/MonthPanel/index.js +1 -1
- package/dist/esm/PickerPanel/panels/PanelBody.d.ts +21 -1
- package/dist/esm/PickerPanel/panels/PanelBody.js +2 -4
- package/dist/esm/PickerPanel/panels/QuarterPanel/QuarterBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/QuarterPanel/QuarterHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/QuarterPanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/RangePanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/RangePanel/index.js +2 -2
- package/dist/esm/PickerPanel/panels/RangePanel/interface.d.ts +5 -5
- package/dist/esm/PickerPanel/panels/TimePanel/TimeBody.d.ts +17 -1
- package/dist/esm/PickerPanel/panels/TimePanel/TimeCell.d.ts +7 -1
- package/dist/esm/PickerPanel/panels/TimePanel/TimeCell.js +1 -1
- package/dist/esm/PickerPanel/panels/TimePanel/TimeColumn.d.ts +14 -1
- package/dist/esm/PickerPanel/panels/TimePanel/TimeColumn.js +1 -1
- package/dist/esm/PickerPanel/panels/TimePanel/TimeHeader.d.ts +4 -1
- package/dist/esm/PickerPanel/panels/TimePanel/index.d.ts +9 -1
- package/dist/esm/PickerPanel/panels/WeekPanel/WeekBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/WeekPanel/WeekHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/WeekPanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/YearPanel/YearBody.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/YearPanel/YearBody.js +3 -2
- package/dist/esm/PickerPanel/panels/YearPanel/YearHeader.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/YearPanel/YearHeader.js +2 -1
- package/dist/esm/PickerPanel/panels/YearPanel/index.d.ts +2 -1
- package/dist/esm/PickerPanel/panels/YearPanel/index.js +1 -1
- package/dist/esm/PickerPanel/picker-panel.js +3 -0
- package/dist/esm/PickerPanel/utils/pickerUtils.d.ts +7 -7
- package/dist/esm/PickerPanel/utils/pickerUtils.js +4 -10
- package/dist/esm/Popover/style/index.less +1 -0
- package/dist/esm/Select/interface.d.ts +77 -0
- package/dist/esm/Select/option.d.ts +2 -1
- package/dist/esm/Select/option.js +11 -2
- package/dist/esm/Select/options.d.ts +3 -2
- package/dist/esm/Select/options.js +3 -1
- package/dist/esm/Select/select.js +1 -3
- package/dist/esm/Select/style/index.less +8 -13
- package/dist/esm/Selector/interface.d.ts +4 -0
- package/dist/esm/Selector/selector.js +4 -2
- package/dist/esm/Selector/style/index.less +21 -137
- package/dist/esm/Table/hooks/useFilter.js +1 -1
- package/dist/esm/Table/interface.d.ts +4 -0
- package/dist/esm/Table/style/index.less +2 -0
- package/dist/esm/Table/theader/filter.js +3 -4
- package/dist/esm/Tabs/demo/basic.js +4 -1
- package/dist/esm/Tabs/tabs.js +3 -1
- package/dist/esm/Tag/demo/checkable.js +1 -0
- package/dist/esm/Tag/tag.js +1 -1
- package/dist/esm/TextArea/style/index.less +0 -17
- package/dist/esm/Trigger/trigger.js +1 -1
- package/dist/esm/style/color.css +1 -1
- package/dist/esm/style/size.css +11 -2
- package/dist/esm/style/themes.css +1 -1
- package/dist/esm/style/variables.css +13 -4
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/yee-c.min.css +2 -2
- package/dist/umd/yee-c.min.js +1 -1
- package/package.json +1 -1
- package/src/Carousel/carousel.tsx +14 -3
- package/src/Carousel/interface.ts +6 -0
- package/src/Cascader/cascader.tsx +68 -63
- package/src/Cascader/column.tsx +1 -1
- package/src/Cascader/interface.ts +19 -2
- package/src/Cascader/node.tsx +12 -7
- package/src/Cascader/search-list.tsx +1 -1
- package/src/Cascader/utils/index.ts +130 -68
- package/src/Drawer/style/index.less +4 -0
- package/src/Dropdown/dropdown.tsx +1 -1
- package/src/FloatButton/float-button.tsx +5 -3
- package/src/Form/demo/basic.tsx +2 -2
- package/src/Form/style/index.less +15 -0
- package/src/Input/style/index.less +19 -17
- package/src/InputNumber/style/index.less +0 -29
- package/src/PickerPanel/interface.ts +43 -2
- package/src/PickerPanel/panels/DatePanel/DateBody.tsx +2 -1
- package/src/PickerPanel/panels/DatePanel/DateHeader.tsx +3 -2
- package/src/PickerPanel/panels/DatePanel/index.tsx +2 -1
- package/src/PickerPanel/panels/DateTimePanel/index.tsx +12 -5
- package/src/PickerPanel/panels/DecadePanel/DecadeBody.tsx +3 -2
- package/src/PickerPanel/panels/DecadePanel/DecadeHeader.tsx +3 -2
- package/src/PickerPanel/panels/DecadePanel/index.tsx +3 -2
- package/src/PickerPanel/panels/Header.tsx +14 -1
- package/src/PickerPanel/panels/MonthPanel/MonthBody.tsx +2 -1
- package/src/PickerPanel/panels/MonthPanel/MonthHeader.tsx +3 -2
- package/src/PickerPanel/panels/MonthPanel/index.tsx +3 -2
- package/src/PickerPanel/panels/PanelBody.tsx +27 -5
- package/src/PickerPanel/panels/QuarterPanel/QuarterBody.tsx +2 -1
- package/src/PickerPanel/panels/QuarterPanel/QuarterHeader.tsx +2 -1
- package/src/PickerPanel/panels/QuarterPanel/index.tsx +2 -1
- package/src/PickerPanel/panels/RangePanel/index.tsx +11 -9
- package/src/PickerPanel/panels/RangePanel/interface.ts +5 -5
- package/src/PickerPanel/panels/TimePanel/TimeBody.tsx +21 -5
- package/src/PickerPanel/panels/TimePanel/TimeCell.tsx +9 -2
- package/src/PickerPanel/panels/TimePanel/TimeColumn.tsx +15 -2
- package/src/PickerPanel/panels/TimePanel/TimeHeader.tsx +5 -1
- package/src/PickerPanel/panels/TimePanel/index.tsx +10 -1
- package/src/PickerPanel/panels/WeekPanel/WeekBody.tsx +2 -1
- package/src/PickerPanel/panels/WeekPanel/WeekHeader.tsx +2 -1
- package/src/PickerPanel/panels/WeekPanel/index.tsx +2 -1
- package/src/PickerPanel/panels/YearPanel/YearBody.tsx +4 -3
- package/src/PickerPanel/panels/YearPanel/YearHeader.tsx +9 -3
- package/src/PickerPanel/panels/YearPanel/index.tsx +3 -2
- package/src/PickerPanel/picker-panel.tsx +5 -3
- package/src/PickerPanel/utils/pickerUtils.ts +17 -8
- package/src/Popover/style/index.less +1 -0
- package/src/Select/interface.ts +87 -0
- package/src/Select/option.tsx +13 -4
- package/src/Select/options.tsx +49 -43
- package/src/Select/select.tsx +5 -2
- package/src/Select/style/index.less +8 -13
- package/src/Selector/interface.ts +4 -0
- package/src/Selector/selector.tsx +2 -0
- package/src/Selector/style/index.less +21 -137
- package/src/Splitter/hooks/useMove.ts +2 -2
- package/src/Table/hooks/useFilter.ts +1 -1
- package/src/Table/interface.ts +4 -0
- package/src/Table/style/index.less +2 -0
- package/src/Table/theader/filter.tsx +2 -2
- package/src/Tabs/demo/basic.tsx +7 -1
- package/src/Tabs/tabs.tsx +3 -2
- package/src/Tag/demo/checkable.tsx +1 -0
- package/src/Tag/tag.tsx +1 -1
- package/src/TextArea/style/index.less +0 -17
- package/src/Trigger/trigger.tsx +1 -1
- package/src/hooks/useEvent.ts +7 -4
- package/src/hooks/useMergedState.ts +6 -4
- package/src/style/color.css +1 -1
- package/src/style/size.css +11 -2
- package/src/version.ts +1 -1
|
@@ -2,10 +2,11 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import useEvent from '../../../hooks/useEvent';
|
|
5
|
+
import type { PanelSharedProps } from '../../interface';
|
|
5
6
|
import pickerUtils from '../../utils/pickerUtils';
|
|
6
7
|
import PanelBody from '../PanelBody';
|
|
7
8
|
|
|
8
|
-
function MonthBody(props:
|
|
9
|
+
function MonthBody(props: PanelSharedProps) {
|
|
9
10
|
const {
|
|
10
11
|
prefixCls,
|
|
11
12
|
viewDate,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Button from '../../../Button';
|
|
3
3
|
import useEvent from '../../../hooks/useEvent';
|
|
4
|
+
import type { PanelSharedProps } from '../../interface';
|
|
4
5
|
import pickerUtils from '../../utils/pickerUtils';
|
|
5
6
|
import Header from '../Header';
|
|
6
7
|
|
|
7
|
-
export default function MonthHeader(props:
|
|
8
|
-
const { prefixCls, viewDate, offsetYear, onViewDateChange, onPanelChange } =
|
|
8
|
+
export default function MonthHeader(props: PanelSharedProps) {
|
|
9
|
+
const { prefixCls, viewDate, offsetYear = 0, onViewDateChange, onPanelChange } =
|
|
9
10
|
props;
|
|
10
11
|
|
|
11
12
|
const year = pickerUtils.getYear(viewDate) + offsetYear;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PanelSharedProps } from '../../interface';
|
|
2
3
|
|
|
3
4
|
import MonthBody from './MonthBody';
|
|
4
5
|
import MonthHeader from './MonthHeader';
|
|
5
6
|
|
|
6
|
-
export default function DecadePanel(props:
|
|
7
|
+
export default function DecadePanel(props: PanelSharedProps) {
|
|
7
8
|
const { prefixCls, offset, showHeader = true } = props;
|
|
8
9
|
|
|
9
10
|
let offsetYear = 0;
|
|
10
11
|
if (offset?.year) {
|
|
11
|
-
offsetYear =
|
|
12
|
+
offsetYear = offset.year;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
return (
|
|
@@ -2,8 +2,28 @@ import clsx from 'clsx';
|
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import pickerUtils from '../utils/pickerUtils';
|
|
5
|
+
import type { PickerType } from '../interface';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
export interface PanelBodyProps {
|
|
8
|
+
prefixCls?: string;
|
|
9
|
+
picker?: PickerType;
|
|
10
|
+
rowCount: number;
|
|
11
|
+
colCount: number;
|
|
12
|
+
baseDate?: Dayjs | number;
|
|
13
|
+
onSelect?: (date: Dayjs) => void;
|
|
14
|
+
handleMouseChange?: (date: Dayjs | '') => void;
|
|
15
|
+
headerCells?: React.ReactNode;
|
|
16
|
+
getCellNode?: (currentDate: Dayjs) => React.ReactNode;
|
|
17
|
+
getCellDate: (baseDate: Dayjs, offset: number) => Dayjs;
|
|
18
|
+
getCellText: (currentDate: Dayjs) => number | string;
|
|
19
|
+
getCellTitle?: (currentDate: Dayjs) => string;
|
|
20
|
+
getCellClassName?: (currentDate: Dayjs) => string;
|
|
21
|
+
prefixColumn?: (currentDate: Dayjs) => React.ReactNode;
|
|
22
|
+
getRowClassName?: (currentDate: Dayjs) => string;
|
|
23
|
+
cellRender?: (date: Dayjs, panel: PickerType) => React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function PanelBody(props: PanelBodyProps) {
|
|
7
27
|
const {
|
|
8
28
|
prefixCls,
|
|
9
29
|
rowCount,
|
|
@@ -39,7 +59,7 @@ function PanelBody(props: any) {
|
|
|
39
59
|
|
|
40
60
|
for (let j = 0; j < colCount; j++) {
|
|
41
61
|
const offset = i * colCount + j;
|
|
42
|
-
const currentDate = getCellDate(baseDate, offset);
|
|
62
|
+
const currentDate = getCellDate(baseDate as Dayjs, offset);
|
|
43
63
|
|
|
44
64
|
if (j === 0) {
|
|
45
65
|
rowStartDate = currentDate;
|
|
@@ -60,11 +80,13 @@ function PanelBody(props: any) {
|
|
|
60
80
|
{
|
|
61
81
|
[`${cellPrefixCls}-start`]:
|
|
62
82
|
getCellText(currentDate) === 1 ||
|
|
63
|
-
(picker === 'year' &&
|
|
83
|
+
(picker === 'year' &&
|
|
84
|
+
Number(getCellText(currentDate)) % 10 === 0),
|
|
64
85
|
[`${cellPrefixCls}-end`]:
|
|
65
86
|
getCellText(currentDate) ===
|
|
66
87
|
pickerUtils.getDate(currentDate.endOf('month')) ||
|
|
67
|
-
(picker === 'year' &&
|
|
88
|
+
(picker === 'year' &&
|
|
89
|
+
Number(getCellText(currentDate)) % 10 === 9),
|
|
68
90
|
},
|
|
69
91
|
cls,
|
|
70
92
|
)}
|
|
@@ -90,7 +112,7 @@ function PanelBody(props: any) {
|
|
|
90
112
|
</div>
|
|
91
113
|
{cellRender ? (
|
|
92
114
|
<div className={`${prefixCls}-cell-content`}>
|
|
93
|
-
{cellRender(currentDate,
|
|
115
|
+
{cellRender(currentDate, picker as PickerType)}
|
|
94
116
|
</div>
|
|
95
117
|
) : null}
|
|
96
118
|
</div>
|
|
@@ -4,11 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import PanelBody from '../PanelBody';
|
|
5
5
|
|
|
6
6
|
import useEvent from '../../../hooks/useEvent';
|
|
7
|
+
import type { PanelSharedProps } from '../../interface';
|
|
7
8
|
import pickerUtils from '../../utils/pickerUtils';
|
|
8
9
|
|
|
9
10
|
const quarter = ['Q1', 'Q2', 'Q3', 'Q4'];
|
|
10
11
|
|
|
11
|
-
function QuarterBody(props:
|
|
12
|
+
function QuarterBody(props: PanelSharedProps) {
|
|
12
13
|
const { prefixCls, viewDate, nowDate } = props;
|
|
13
14
|
|
|
14
15
|
const baseDate = pickerUtils.setMonth(viewDate, 0);
|
|
@@ -2,10 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import Button from '../../../Button';
|
|
3
3
|
import useEvent from '../../../hooks/useEvent';
|
|
4
4
|
import Header from '../Header';
|
|
5
|
+
import type { PanelSharedProps } from '../../interface';
|
|
5
6
|
|
|
6
7
|
import pickerUtils from '../../utils/pickerUtils';
|
|
7
8
|
|
|
8
|
-
export default function QuarterHeader(props:
|
|
9
|
+
export default function QuarterHeader(props: PanelSharedProps) {
|
|
9
10
|
const { prefixCls, viewDate, onViewDateChange, onPanelChange } = props;
|
|
10
11
|
|
|
11
12
|
const year = pickerUtils.getYear(viewDate);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PanelSharedProps } from '../../interface';
|
|
2
3
|
|
|
3
4
|
import QuarterBody from './QuarterBody';
|
|
4
5
|
import QuarterHeader from './QuarterHeader';
|
|
5
6
|
|
|
6
|
-
export default function DecadePanel(props:
|
|
7
|
+
export default function DecadePanel(props: PanelSharedProps) {
|
|
7
8
|
const { prefixCls } = props;
|
|
8
9
|
return (
|
|
9
10
|
<div className={`${prefixCls}-quarter-panel`}>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Dayjs } from 'dayjs';
|
|
4
|
+
import type { PickerPanelProps } from '../../interface';
|
|
5
|
+
import type { RangePanelProps } from './interface';
|
|
4
6
|
import PickerPanel from '../../picker-panel';
|
|
5
7
|
import pickerUtils from '../../utils/pickerUtils';
|
|
6
8
|
|
|
7
|
-
function RangePanel(props:
|
|
9
|
+
function RangePanel(props: RangePanelProps) {
|
|
8
10
|
const {
|
|
9
11
|
prefixCls = 'yee-picker',
|
|
10
12
|
panel = 'start',
|
|
@@ -28,12 +30,12 @@ function RangePanel(props: any) {
|
|
|
28
30
|
picker={picker}
|
|
29
31
|
value={panel === 'start' ? value[0] : value[1]}
|
|
30
32
|
pickerView={pickerUtils.init(pickerView[panel === 'start' ? 0 : 1])}
|
|
31
|
-
onChange={onChange}
|
|
33
|
+
onChange={onChange as PickerPanelProps['onChange']}
|
|
32
34
|
onPanelChange={onPanelChange}
|
|
33
35
|
onCellMouse={onCellMouse}
|
|
34
36
|
hoverRange={hoverRange}
|
|
35
37
|
selectedRange={selectedRange}
|
|
36
|
-
disabledDate={disabledDate}
|
|
38
|
+
disabledDate={disabledDate as PickerPanelProps['disabledDate']}
|
|
37
39
|
footer={false}
|
|
38
40
|
/>
|
|
39
41
|
</div>
|
|
@@ -61,12 +63,12 @@ function RangePanel(props: any) {
|
|
|
61
63
|
picker={picker}
|
|
62
64
|
value={startValue}
|
|
63
65
|
pickerView={startViewDate}
|
|
64
|
-
onChange={onChange}
|
|
65
|
-
onPanelChange={(viewDate) => onPanelChange(viewDate, 'start')}
|
|
66
|
+
onChange={onChange as PickerPanelProps['onChange']}
|
|
67
|
+
onPanelChange={(viewDate) => onPanelChange?.(viewDate, 'start')}
|
|
66
68
|
onCellMouse={onCellMouse}
|
|
67
69
|
hoverRange={hoverRange}
|
|
68
70
|
selectedRange={selectedRange}
|
|
69
|
-
disabledDate={disabledDate}
|
|
71
|
+
disabledDate={disabledDate as PickerPanelProps['disabledDate']}
|
|
70
72
|
footer={false}
|
|
71
73
|
showNextIcon={false}
|
|
72
74
|
showSuperNextIcon={false}
|
|
@@ -76,12 +78,12 @@ function RangePanel(props: any) {
|
|
|
76
78
|
picker={picker}
|
|
77
79
|
value={endValue}
|
|
78
80
|
pickerView={endViewDate}
|
|
79
|
-
onChange={onChange}
|
|
80
|
-
onPanelChange={(viewDate) => onPanelChange(viewDate, 'end')}
|
|
81
|
+
onChange={onChange as PickerPanelProps['onChange']}
|
|
82
|
+
onPanelChange={(viewDate) => onPanelChange?.(viewDate, 'end')}
|
|
81
83
|
onCellMouse={onCellMouse}
|
|
82
84
|
hoverRange={hoverRange}
|
|
83
85
|
selectedRange={selectedRange}
|
|
84
|
-
disabledDate={disabledDate}
|
|
86
|
+
disabledDate={disabledDate as PickerPanelProps['disabledDate']}
|
|
85
87
|
footer={false}
|
|
86
88
|
showPrevIcon={false}
|
|
87
89
|
showSuperPrevIcon={false}
|
|
@@ -22,17 +22,17 @@ export type PickerType =
|
|
|
22
22
|
export interface RangePanelProps {
|
|
23
23
|
prefixCls?: string;
|
|
24
24
|
panel?: 'start' | 'end';
|
|
25
|
-
value
|
|
26
|
-
|
|
25
|
+
value: Array<Dayjs | undefined>;
|
|
26
|
+
pickerView: [Dayjs, Dayjs];
|
|
27
27
|
picker?: PickerType;
|
|
28
28
|
mode?: PickerMode;
|
|
29
29
|
format?: string;
|
|
30
30
|
saveFormat?: string;
|
|
31
31
|
onChange?: (date: Dayjs, panel: string) => void;
|
|
32
|
-
onPanelChange?: (
|
|
32
|
+
onPanelChange?: (date: Dayjs, type?: 'start' | 'end') => void;
|
|
33
33
|
onCellMouse?: (date: Dayjs | string) => void;
|
|
34
|
-
hoverRange?: Array<Dayjs | null>;
|
|
35
|
-
selectedRange?: Array<Dayjs | null>;
|
|
34
|
+
hoverRange?: Array<Dayjs | null | undefined>;
|
|
35
|
+
selectedRange?: Array<Dayjs | null | undefined>;
|
|
36
36
|
disabledDate?: (current: Dayjs, type: 'start' | 'end') => boolean;
|
|
37
37
|
showNextIcon?: boolean;
|
|
38
38
|
showSuperNextIcon?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import type { PanelSharedProps, TimeUnit } from '../../interface';
|
|
3
4
|
import panelConfig from '../../configs';
|
|
4
5
|
import pickerUtils from '../../utils/pickerUtils';
|
|
5
6
|
import TimeColumn from './TimeColumn';
|
|
@@ -10,7 +11,7 @@ function getTimeArray(
|
|
|
10
11
|
length: number,
|
|
11
12
|
step: number,
|
|
12
13
|
viewDate: Dayjs,
|
|
13
|
-
type:
|
|
14
|
+
type: TimeUnit,
|
|
14
15
|
): Array<Dayjs> {
|
|
15
16
|
const arr = new Array(length)
|
|
16
17
|
.fill(0)
|
|
@@ -25,7 +26,22 @@ function getTimeArray(
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
interface TimeBodyProps extends PanelSharedProps {
|
|
30
|
+
value?: Dayjs;
|
|
31
|
+
showTitle?: boolean;
|
|
32
|
+
showHour?: boolean;
|
|
33
|
+
showMinute?: boolean;
|
|
34
|
+
showSecond?: boolean;
|
|
35
|
+
disabledHours?: boolean;
|
|
36
|
+
disabledMinutes?: boolean;
|
|
37
|
+
disabledSeconds?: boolean;
|
|
38
|
+
is12hour?: boolean;
|
|
39
|
+
hourStep?: number;
|
|
40
|
+
minuteStep?: number;
|
|
41
|
+
secondStep?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function TimeBody(props: TimeBodyProps) {
|
|
29
45
|
const {
|
|
30
46
|
value,
|
|
31
47
|
prefixCls,
|
|
@@ -48,10 +64,10 @@ function TimeBody(props: any) {
|
|
|
48
64
|
const columns: React.ReactNode[] = [];
|
|
49
65
|
|
|
50
66
|
function addColumnNode(
|
|
51
|
-
type:
|
|
52
|
-
selectedValue:
|
|
67
|
+
type: TimeUnit,
|
|
68
|
+
selectedValue: Dayjs | undefined,
|
|
53
69
|
cells: Array<Dayjs>,
|
|
54
|
-
disabled
|
|
70
|
+
disabled?: boolean,
|
|
55
71
|
): React.ReactNode {
|
|
56
72
|
return (
|
|
57
73
|
<TimeColumn
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface TimeCellProps {
|
|
5
|
+
prefixCls?: string;
|
|
6
|
+
value: number;
|
|
7
|
+
onSelect?: (value: number) => void;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function TimeCell(props: TimeCellProps) {
|
|
5
12
|
const { prefixCls, value, onSelect, active } = props;
|
|
6
13
|
|
|
7
14
|
const cls = clsx(`${prefixCls}-time-panel-cell`, {
|
|
@@ -11,7 +18,7 @@ function TimeCell(props: any) {
|
|
|
11
18
|
const renderValue = value < 10 ? '0' + value : value;
|
|
12
19
|
|
|
13
20
|
return (
|
|
14
|
-
<li className={cls} onClick={() => onSelect(value)}>
|
|
21
|
+
<li className={cls} onClick={() => onSelect?.(value)}>
|
|
15
22
|
<div className={`${prefixCls}-time-panel-cell-inner`}>{renderValue}</div>
|
|
16
23
|
</li>
|
|
17
24
|
);
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import dayjs, { Dayjs } from 'dayjs';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import type { TimeUnit } from '../../interface';
|
|
4
5
|
import pickerUtils from '../../utils/pickerUtils';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
interface TimeColumnProps {
|
|
8
|
+
prefixCls?: string;
|
|
9
|
+
type: TimeUnit;
|
|
10
|
+
value?: Dayjs;
|
|
11
|
+
cells: Dayjs[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onSelect?: (date: Dayjs) => void;
|
|
14
|
+
viewDate?: Dayjs;
|
|
15
|
+
maxDate?: Dayjs;
|
|
16
|
+
minDate?: Dayjs;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function TimeColumn(props: TimeColumnProps) {
|
|
7
20
|
const {
|
|
8
21
|
prefixCls,
|
|
9
22
|
type,
|
|
@@ -20,7 +33,7 @@ function TimeColumn(props: any) {
|
|
|
20
33
|
const [selectedCell, setSelectedCell] = React.useState<number>();
|
|
21
34
|
|
|
22
35
|
React.useLayoutEffect(() => {
|
|
23
|
-
if (value !==
|
|
36
|
+
if (value !== undefined && selectedRef.current) {
|
|
24
37
|
ref.current?.scrollTo({
|
|
25
38
|
top: selectedRef.current?.offsetTop,
|
|
26
39
|
behavior: 'smooth',
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PanelSharedProps } from '../../interface';
|
|
2
3
|
import TimeBody from './TimeBody';
|
|
3
4
|
import TimeHeader from './TimeHeader';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
interface TimePanelProps extends PanelSharedProps {
|
|
7
|
+
format?: string;
|
|
8
|
+
hourStep?: number;
|
|
9
|
+
minuteStep?: number;
|
|
10
|
+
secondStep?: number;
|
|
11
|
+
showTitle?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function TimePanel(props: TimePanelProps) {
|
|
6
15
|
const {
|
|
7
16
|
format = 'HH:mm:ss',
|
|
8
17
|
prefixCls,
|
|
@@ -3,10 +3,11 @@ import { Dayjs } from 'dayjs';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import useEvent from '../../../hooks/useEvent';
|
|
5
5
|
import { useLocale } from '../../../locale';
|
|
6
|
+
import type { PanelSharedProps } from '../../interface';
|
|
6
7
|
import pickerUtils from '../../utils/pickerUtils';
|
|
7
8
|
import PanelBody from '../PanelBody';
|
|
8
9
|
|
|
9
|
-
function WeekBody(props:
|
|
10
|
+
function WeekBody(props: PanelSharedProps) {
|
|
10
11
|
const { locale } = useLocale();
|
|
11
12
|
const { weekpicker } = locale;
|
|
12
13
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Button from '../../../Button';
|
|
3
3
|
import useEvent from '../../../hooks/useEvent';
|
|
4
|
+
import type { PanelSharedProps } from '../../interface';
|
|
4
5
|
import pickerUtils from '../../utils/pickerUtils';
|
|
5
6
|
import Header from '../Header';
|
|
6
7
|
|
|
7
|
-
export default function WeekHeader(props:
|
|
8
|
+
export default function WeekHeader(props: PanelSharedProps) {
|
|
8
9
|
const { viewDate, onViewDateChange, onPanelChange } = props;
|
|
9
10
|
|
|
10
11
|
const year = pickerUtils.getYear(viewDate);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { Dayjs } from 'dayjs';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import type { PanelSharedProps } from '../../interface';
|
|
4
5
|
import pickerUtils from '../../utils/pickerUtils';
|
|
5
6
|
import DateBody from '../DatePanel/DateBody';
|
|
6
7
|
import DateHeader from '../DatePanel/DateHeader';
|
|
7
8
|
|
|
8
|
-
export default function WeekPanel(props:
|
|
9
|
+
export default function WeekPanel(props: PanelSharedProps) {
|
|
9
10
|
const { prefixCls, selectedDate } = props;
|
|
10
11
|
|
|
11
12
|
const prefixColumn = (currentDate: Dayjs) => {
|
|
@@ -4,9 +4,10 @@ import * as React from 'react';
|
|
|
4
4
|
import PanelBody from '../PanelBody';
|
|
5
5
|
|
|
6
6
|
import useEvent from '../../../hooks/useEvent';
|
|
7
|
+
import type { PanelSharedProps } from '../../interface';
|
|
7
8
|
import pickerUtils from '../../utils/pickerUtils';
|
|
8
9
|
|
|
9
|
-
function YearBody(props:
|
|
10
|
+
function YearBody(props: PanelSharedProps) {
|
|
10
11
|
const {
|
|
11
12
|
prefixCls,
|
|
12
13
|
viewDate,
|
|
@@ -14,7 +15,7 @@ function YearBody(props: any) {
|
|
|
14
15
|
maxDate,
|
|
15
16
|
minDate,
|
|
16
17
|
nowDate,
|
|
17
|
-
offsetYear,
|
|
18
|
+
offsetYear = 0,
|
|
18
19
|
hoverRange = [],
|
|
19
20
|
selectedRange = [],
|
|
20
21
|
} = props;
|
|
@@ -34,7 +35,7 @@ function YearBody(props: any) {
|
|
|
34
35
|
|
|
35
36
|
const getCellTitle = useEvent((currentDate: Dayjs) => {
|
|
36
37
|
const _year = pickerUtils.getYear(currentDate) + offsetYear;
|
|
37
|
-
return _year < 1000 ? '0' + _year : _year;
|
|
38
|
+
return _year < 1000 ? '0' + _year : String(_year);
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
const getCellClassName = useEvent((currentDate: Dayjs) => {
|
|
@@ -2,12 +2,18 @@ import * as React from 'react';
|
|
|
2
2
|
import Button from '../../../Button';
|
|
3
3
|
import useEvent from '../../../hooks/useEvent';
|
|
4
4
|
import Header from '../Header';
|
|
5
|
+
import type { PanelSharedProps } from '../../interface';
|
|
5
6
|
|
|
6
7
|
import pickerUtils from '../../utils/pickerUtils';
|
|
7
8
|
|
|
8
|
-
export default function YearHeader(props:
|
|
9
|
-
const {
|
|
10
|
-
|
|
9
|
+
export default function YearHeader(props: PanelSharedProps) {
|
|
10
|
+
const {
|
|
11
|
+
prefixCls,
|
|
12
|
+
viewDate,
|
|
13
|
+
onViewDateChange,
|
|
14
|
+
onPanelChange,
|
|
15
|
+
offsetYear = 0,
|
|
16
|
+
} = props;
|
|
11
17
|
|
|
12
18
|
const viewYear = pickerUtils.getYear(viewDate);
|
|
13
19
|
const startYear = viewYear - (viewYear % 10) + offsetYear;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PanelSharedProps } from '../../interface';
|
|
2
3
|
import YearBody from './YearBody';
|
|
3
4
|
import YearHeader from './YearHeader';
|
|
4
5
|
|
|
5
|
-
export default function DecadePanel(props:
|
|
6
|
+
export default function DecadePanel(props: PanelSharedProps) {
|
|
6
7
|
const { prefixCls, offset } = props;
|
|
7
8
|
|
|
8
9
|
let offsetYear = 0;
|
|
9
10
|
if (offset?.year) {
|
|
10
|
-
offsetYear =
|
|
11
|
+
offsetYear = offset.year;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
return (
|
|
@@ -76,7 +76,7 @@ const PickerPanel = React.forwardRef<HTMLDivElement, PickerPanelProps>(
|
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
// Panel view switch
|
|
79
|
-
const handlePanelChange = (newView:
|
|
79
|
+
const handlePanelChange = (newView: PickerType) => {
|
|
80
80
|
prevPanelView.current = panelView;
|
|
81
81
|
setPanelView(newView);
|
|
82
82
|
};
|
|
@@ -87,8 +87,10 @@ const PickerPanel = React.forwardRef<HTMLDivElement, PickerPanelProps>(
|
|
|
87
87
|
onPanelChange?.(newViewDate);
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
// `PanelBody` clears the hover by passing `''`; forward as-is to preserve
|
|
91
|
+
// the existing runtime behavior.
|
|
92
|
+
const handleMouseChange = (date: Dayjs | '') => {
|
|
93
|
+
onCellMouse?.(date as Dayjs);
|
|
92
94
|
};
|
|
93
95
|
|
|
94
96
|
const handleNowClick = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
import dayjs, { Dayjs, QUnitType } from 'dayjs';
|
|
2
|
+
import dayjs, { Dayjs, OpUnitType, QUnitType } from 'dayjs';
|
|
3
3
|
import buddhistEra from 'dayjs/plugin/buddhistEra';
|
|
4
4
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
5
5
|
import isBetween from 'dayjs/plugin/isBetween';
|
|
@@ -26,7 +26,7 @@ type PickerType =
|
|
|
26
26
|
|
|
27
27
|
const d = {
|
|
28
28
|
dayjs: dayjs,
|
|
29
|
-
init: (date?:
|
|
29
|
+
init: (date?: dayjs.ConfigType, option?: dayjs.OptionType) => dayjs(date, option),
|
|
30
30
|
getNow: () => {
|
|
31
31
|
return d.init(undefined);
|
|
32
32
|
},
|
|
@@ -40,7 +40,11 @@ const d = {
|
|
|
40
40
|
getSecond: (date: Dayjs) => date.second(),
|
|
41
41
|
|
|
42
42
|
format: (date: Dayjs, format: string) => dayjs(date).format(format),
|
|
43
|
-
isSame: (
|
|
43
|
+
isSame: (
|
|
44
|
+
date1: Dayjs | undefined,
|
|
45
|
+
date2: Dayjs | undefined,
|
|
46
|
+
type?: PickerType,
|
|
47
|
+
) => {
|
|
44
48
|
if (!d.isValid(date1) && !d.isValid(date2)) return true;
|
|
45
49
|
return date1 && date2 ? date1.isSame(date2, type as QUnitType) : false;
|
|
46
50
|
},
|
|
@@ -56,18 +60,23 @@ const d = {
|
|
|
56
60
|
addDate: (date: Dayjs, offset: number) => date?.add(offset, 'day'),
|
|
57
61
|
isAfter: (
|
|
58
62
|
date1: Dayjs,
|
|
59
|
-
date2: Dayjs,
|
|
63
|
+
date2: Dayjs | undefined,
|
|
60
64
|
type?: 'day' | 'hour' | 'minute' | 'second' | 'year' | 'month',
|
|
61
65
|
) => (date2 ? date1.isAfter(date2, type) : false),
|
|
62
66
|
isBefore: (
|
|
63
67
|
date1: Dayjs,
|
|
64
|
-
date2: Dayjs,
|
|
68
|
+
date2: Dayjs | undefined,
|
|
65
69
|
type?: 'day' | 'hour' | 'minute' | 'second' | 'year' | 'month',
|
|
66
70
|
) => (date2 ? date1.isBefore(date2, type) : false),
|
|
67
|
-
isValid: (date: Dayjs, format?: string, strict?: boolean) =>
|
|
71
|
+
isValid: (date: Dayjs | undefined, format?: string, strict?: boolean) =>
|
|
68
72
|
dayjs(date, format, strict).isValid(),
|
|
69
|
-
isBetween: (
|
|
70
|
-
date
|
|
73
|
+
isBetween: (
|
|
74
|
+
date: Dayjs,
|
|
75
|
+
start: Dayjs,
|
|
76
|
+
end: Dayjs,
|
|
77
|
+
unit?: OpUnitType,
|
|
78
|
+
nulls?: '()' | '[]' | '[)' | '(]',
|
|
79
|
+
) => (date && start && end ? date.isBetween(start, end, unit, nulls) : false),
|
|
71
80
|
|
|
72
81
|
getCellClassName: ({
|
|
73
82
|
date,
|