pcm-shared-components 0.0.139 → 0.0.140
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.
|
@@ -33,19 +33,8 @@ export const DateRangeCalendar = props => {
|
|
|
33
33
|
variant
|
|
34
34
|
} = props;
|
|
35
35
|
|
|
36
|
-
const isValidRenderFunction = functionToCheck => {
|
|
37
|
-
try {
|
|
38
|
-
//Makes sure we have a function and also that it's a valid react element which the calendar will use to display the date.
|
|
39
|
-
return functionToCheck && /*#__PURE__*/React.isValidElement(functionToCheck) ? true : false;
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error(error);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return false;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
36
|
const handleOnDayRender = date => {
|
|
48
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, onDayRender
|
|
37
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, onDayRender ? /*#__PURE__*/React.createElement(React.Fragment, null, onDayRender(date)) : /*#__PURE__*/React.createElement("span", {
|
|
49
38
|
className: ""
|
|
50
39
|
}, new Date(date).getDate()));
|
|
51
40
|
};
|