pixelize-design-library 2.1.46 → 2.1.47

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.
@@ -67,6 +67,9 @@ function CustomDatePicker(props) {
67
67
  if (!isRange && !selectedDate) {
68
68
  setTempDate(new Date());
69
69
  }
70
+ if (showTime) {
71
+ setTempDate(new Date()); // add new
72
+ }
70
73
  onOpen();
71
74
  };
72
75
  (0, react_1.useEffect)(function () {
@@ -164,6 +167,9 @@ function CustomDatePicker(props) {
164
167
  if (popoverRef.current &&
165
168
  !popoverRef.current.contains(event.target) &&
166
169
  !((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
170
+ if (tempDate) {
171
+ props.onChange(tempDate); // add new
172
+ }
167
173
  onClose();
168
174
  }
169
175
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.1.46",
3
+ "version": "2.1.47",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",