@skedulo/sked-ui 21.6.1 → 21.6.2
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.
|
@@ -108,6 +108,7 @@ export interface DatepickerProps {
|
|
|
108
108
|
* onCalendarClose fuction
|
|
109
109
|
*/
|
|
110
110
|
onCalendarClose?: () => void;
|
|
111
|
+
inputRef?: React.MutableRefObject<HTMLInputElement>;
|
|
111
112
|
}
|
|
112
113
|
declare type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
113
114
|
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
package/dist/index.js
CHANGED
|
@@ -17849,7 +17849,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17849
17849
|
|
|
17850
17850
|
var _excluded = ["onClick", "disabled", "placeholder", "value", "onChange", "onBlur", "onKeyDown"],
|
|
17851
17851
|
_excluded2 = ["openCalendar", "onBlurCustom", "onBackspace", "Component", "onKeyDown", "onBlur"],
|
|
17852
|
-
_excluded3 = ["onChange", "onWeekSelect", "highlightWeek", "selected", "selectWeek", "selectedRange", "customInput", "highlightDates", "locale", "dateFormat", "inline", "clearable"];
|
|
17852
|
+
_excluded3 = ["onChange", "onWeekSelect", "highlightWeek", "selected", "selectWeek", "selectedRange", "customInput", "highlightDates", "locale", "dateFormat", "inline", "clearable", "inputRef"];
|
|
17853
17853
|
|
|
17854
17854
|
|
|
17855
17855
|
|
|
@@ -17976,6 +17976,7 @@ var Datepicker = function Datepicker(_ref3) {
|
|
|
17976
17976
|
inline = _ref3.inline,
|
|
17977
17977
|
_ref3$clearable = _ref3.clearable,
|
|
17978
17978
|
clearable = _ref3$clearable === void 0 ? true : _ref3$clearable,
|
|
17979
|
+
inputRef = _ref3.inputRef,
|
|
17979
17980
|
pickerProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default()(_ref3, _excluded3);
|
|
17980
17981
|
|
|
17981
17982
|
var calendarRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"](null);
|
|
@@ -18104,7 +18105,13 @@ var Datepicker = function Datepicker(_ref3) {
|
|
|
18104
18105
|
onBackspace: handleOnBackspace,
|
|
18105
18106
|
Component: customInput || DefaultInput
|
|
18106
18107
|
}),
|
|
18107
|
-
ref:
|
|
18108
|
+
ref: function ref(datepickerRef) {
|
|
18109
|
+
calendarRef.current = datepickerRef;
|
|
18110
|
+
|
|
18111
|
+
if (inputRef) {
|
|
18112
|
+
inputRef.current = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.input;
|
|
18113
|
+
}
|
|
18114
|
+
},
|
|
18108
18115
|
highlightDates: highlightedDates,
|
|
18109
18116
|
locale: localeObject,
|
|
18110
18117
|
isClearable: true,
|