nexaas-ui-components 1.0.58 → 1.0.60
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.
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -822,10 +822,16 @@ var DatePickerInput = React5.forwardRef(
|
|
|
822
822
|
disabled,
|
|
823
823
|
onChange: (e, isUserChange) => {
|
|
824
824
|
if (isUserChange) {
|
|
825
|
-
|
|
825
|
+
let value = e;
|
|
826
|
+
if (e) {
|
|
827
|
+
const date = new Date(e);
|
|
828
|
+
date.setUTCHours(23, 59, 59, 0);
|
|
829
|
+
value = date.toISOString();
|
|
830
|
+
}
|
|
831
|
+
field.onChange(value);
|
|
826
832
|
setShowCalendar(false);
|
|
827
833
|
if (onChangeFunction) {
|
|
828
|
-
onChangeFunction(
|
|
834
|
+
onChangeFunction(value);
|
|
829
835
|
}
|
|
830
836
|
setInvalidDate(false);
|
|
831
837
|
}
|
|
@@ -833,7 +839,10 @@ var DatePickerInput = React5.forwardRef(
|
|
|
833
839
|
value: normalizedValue,
|
|
834
840
|
locale: "pt-BR",
|
|
835
841
|
highlightCurrentDay: true,
|
|
836
|
-
formatDate: (value) =>
|
|
842
|
+
formatDate: (value) => {
|
|
843
|
+
const adjusted = new Date(value.getTime() + value.getTimezoneOffset() * 6e4);
|
|
844
|
+
return dateFns.format(adjusted, dateFnsFormat);
|
|
845
|
+
},
|
|
837
846
|
parseDate: (value) => dateFns.parse(value, dateFnsFormat, /* @__PURE__ */ new Date()),
|
|
838
847
|
maxDate: maxDate || new Date((/* @__PURE__ */ new Date()).getFullYear() + 5, 11, 31),
|
|
839
848
|
minDate: minDate || new Date(1900, 0, 1)
|