@monolith-forensics/monolith-ui 1.1.80 → 1.1.82
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.
|
@@ -334,12 +334,15 @@ const DateInput = styled(({ className, defaultValue, format = "YYYY-MM-DD HH:mm:
|
|
|
334
334
|
if (!(selectedSegment === null || selectedSegment === void 0 ? void 0 : selectedSegment.momentType))
|
|
335
335
|
return prev;
|
|
336
336
|
const momentValue = utc ? moment.utc(prev) : moment(prev);
|
|
337
|
-
|
|
337
|
+
let newValue = moment(momentValue)
|
|
338
338
|
.set(selectedSegment.momentType, parseInt(tempValue, 10) -
|
|
339
339
|
(selectedSegment.type === "month" ? 1 : 0))
|
|
340
340
|
.toISOString();
|
|
341
341
|
if (!checkValidRange(newValue))
|
|
342
342
|
return prev;
|
|
343
|
+
if (isDateOnly) {
|
|
344
|
+
newValue = moment(newValue).format("YYYY-MM-DD");
|
|
345
|
+
}
|
|
343
346
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
344
347
|
return newValue;
|
|
345
348
|
});
|
package/dist/Switch/Switch.js
CHANGED