oa-componentbook 0.18.137 → 0.18.138
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.
|
@@ -37,7 +37,8 @@ function DateDropDown(_ref) {
|
|
|
37
37
|
getValues,
|
|
38
38
|
defaultLabel,
|
|
39
39
|
disabledDate,
|
|
40
|
-
subLine
|
|
40
|
+
subLine,
|
|
41
|
+
getDefaultValue
|
|
41
42
|
} = _ref;
|
|
42
43
|
const [showRangePicker, setshowRangePicker] = (0, _react.useState)(false);
|
|
43
44
|
const [selectValue, setSelectValue] = (0, _react.useState)({
|
|
@@ -54,7 +55,7 @@ function DateDropDown(_ref) {
|
|
|
54
55
|
labelWithDate[option.label] = option.value;
|
|
55
56
|
});
|
|
56
57
|
if (selectValue !== null && selectValue !== void 0 && selectValue.label && labelWithDate[selectValue.label] !== -1 && selectValue.label in labelWithDate) {
|
|
57
|
-
|
|
58
|
+
getDefaultValue({
|
|
58
59
|
startDate: (0, _dayjs3.default)(getDateOffset(labelWithDate[selectValue.label])).format(format),
|
|
59
60
|
endDate: (0, _dayjs3.default)(getDateOffset(0)).format(format)
|
|
60
61
|
});
|
|
@@ -162,7 +163,8 @@ DateDropDown.propTypes = {
|
|
|
162
163
|
format: _propTypes.default.string,
|
|
163
164
|
defaultLabel: _propTypes.default.string,
|
|
164
165
|
disabledDate: _propTypes.default.func,
|
|
165
|
-
subLine: _propTypes.default.string
|
|
166
|
+
subLine: _propTypes.default.string,
|
|
167
|
+
getDefaultValue: _propTypes.default.func
|
|
166
168
|
};
|
|
167
169
|
DateDropDown.defaultProps = {
|
|
168
170
|
options: [],
|
|
@@ -170,6 +172,7 @@ DateDropDown.defaultProps = {
|
|
|
170
172
|
getValues: () => {},
|
|
171
173
|
defaultLabel: null,
|
|
172
174
|
disabledDate: () => {},
|
|
173
|
-
subLine: ''
|
|
175
|
+
subLine: '',
|
|
176
|
+
getDefaultValue: () => {}
|
|
174
177
|
};
|
|
175
178
|
var _default = exports.default = DateDropDown;
|