@pisell/date-picker 1.0.19 → 1.0.21
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.
|
@@ -13,7 +13,7 @@ export interface PisellDateRangePickerProps {
|
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
};
|
|
15
15
|
placeholder?: string;
|
|
16
|
-
|
|
16
|
+
disabledDate?: (day: Dayjs, position: "start" | "end", value: Dayjs[]) => boolean;
|
|
17
17
|
format?: string;
|
|
18
18
|
suffixIcon?: React.ReactNode;
|
|
19
19
|
bordered?: boolean;
|
|
@@ -34,7 +34,7 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
34
34
|
className = props.className,
|
|
35
35
|
showTime = props.showTime,
|
|
36
36
|
placeholder = props.placeholder,
|
|
37
|
-
|
|
37
|
+
disabledDate = props.disabledDate,
|
|
38
38
|
format = props.format,
|
|
39
39
|
defaultValue = props.defaultValue,
|
|
40
40
|
suffixIcon = props.suffixIcon,
|
|
@@ -99,7 +99,7 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
99
99
|
};
|
|
100
100
|
useCssVariables({
|
|
101
101
|
variables: {
|
|
102
|
-
|
|
102
|
+
"--pisell-date-range-picker-popup-width": "".concat(popupWidth, "px")
|
|
103
103
|
},
|
|
104
104
|
dom: document.body
|
|
105
105
|
});
|
|
@@ -118,7 +118,9 @@ var PisellDateRangePicker = function PisellDateRangePicker(props) {
|
|
|
118
118
|
onChange: handleChange,
|
|
119
119
|
onOpen: handleOpen,
|
|
120
120
|
open: open,
|
|
121
|
-
shouldDisableDate:
|
|
121
|
+
shouldDisableDate: function shouldDisableDate(current, position) {
|
|
122
|
+
return disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate(current, position, _value);
|
|
123
|
+
},
|
|
122
124
|
slots: {
|
|
123
125
|
actionBar: ActionBar,
|
|
124
126
|
shortcuts: Shortcuts,
|
|
@@ -13,7 +13,7 @@ export interface PisellDateRangePickerProps {
|
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
};
|
|
15
15
|
placeholder?: string;
|
|
16
|
-
|
|
16
|
+
disabledDate?: (day: Dayjs, position: "start" | "end", value: Dayjs[]) => boolean;
|
|
17
17
|
format?: string;
|
|
18
18
|
suffixIcon?: React.ReactNode;
|
|
19
19
|
bordered?: boolean;
|
|
@@ -58,7 +58,7 @@ var PisellDateRangePicker = (props) => {
|
|
|
58
58
|
className,
|
|
59
59
|
showTime,
|
|
60
60
|
placeholder,
|
|
61
|
-
|
|
61
|
+
disabledDate,
|
|
62
62
|
format,
|
|
63
63
|
defaultValue,
|
|
64
64
|
suffixIcon,
|
|
@@ -140,7 +140,7 @@ var PisellDateRangePicker = (props) => {
|
|
|
140
140
|
onChange: handleChange,
|
|
141
141
|
onOpen: handleOpen,
|
|
142
142
|
open,
|
|
143
|
-
shouldDisableDate:
|
|
143
|
+
shouldDisableDate: (current, position) => disabledDate == null ? void 0 : disabledDate(current, position, _value),
|
|
144
144
|
slots: {
|
|
145
145
|
actionBar: import_ActionBar.default,
|
|
146
146
|
shortcuts: import_Shortcuts.default,
|