@apexcura/ui-components 0.0.11-Beta173 → 0.0.11-Beta175
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.js +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -666,20 +666,19 @@ var DatePickerElement = (props) => {
|
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
668
|
const onHandleDecrement = () => {
|
|
669
|
-
|
|
670
|
-
const newDate = (0, import_moment.default)(
|
|
669
|
+
const currentDate = date || (0, import_moment.default)();
|
|
670
|
+
const newDate = (0, import_moment.default)(currentDate).subtract(1, "days");
|
|
671
671
|
setDate(newDate);
|
|
672
672
|
if (props.onChange) {
|
|
673
673
|
props.onChange(newDate.format("lll"));
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
676
|
const onHandleIncrement = () => {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
677
|
+
const currentDate = date || (0, import_moment.default)();
|
|
678
|
+
const newDate = (0, import_moment.default)(currentDate).add(1, "days");
|
|
679
|
+
setDate(newDate);
|
|
680
|
+
if (props.onChange) {
|
|
681
|
+
props.onChange(newDate.format("lll"));
|
|
683
682
|
}
|
|
684
683
|
};
|
|
685
684
|
return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react20.default.createElement(
|
|
@@ -687,6 +686,7 @@ var DatePickerElement = (props) => {
|
|
|
687
686
|
{
|
|
688
687
|
placeholder: props.placeholder,
|
|
689
688
|
value: date,
|
|
689
|
+
variant: "borderless",
|
|
690
690
|
onChange: handleChange
|
|
691
691
|
}
|
|
692
692
|
), /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null)));
|
package/dist/index.mjs
CHANGED
|
@@ -615,20 +615,19 @@ var DatePickerElement = (props) => {
|
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
617
|
const onHandleDecrement = () => {
|
|
618
|
-
|
|
619
|
-
const newDate = moment(
|
|
618
|
+
const currentDate = date || moment();
|
|
619
|
+
const newDate = moment(currentDate).subtract(1, "days");
|
|
620
620
|
setDate(newDate);
|
|
621
621
|
if (props.onChange) {
|
|
622
622
|
props.onChange(newDate.format("lll"));
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
const onHandleIncrement = () => {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
}
|
|
626
|
+
const currentDate = date || moment();
|
|
627
|
+
const newDate = moment(currentDate).add(1, "days");
|
|
628
|
+
setDate(newDate);
|
|
629
|
+
if (props.onChange) {
|
|
630
|
+
props.onChange(newDate.format("lll"));
|
|
632
631
|
}
|
|
633
632
|
};
|
|
634
633
|
return /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ React19.createElement(LeftOutlined, null)), /* @__PURE__ */ React19.createElement(
|
|
@@ -636,6 +635,7 @@ var DatePickerElement = (props) => {
|
|
|
636
635
|
{
|
|
637
636
|
placeholder: props.placeholder,
|
|
638
637
|
value: date,
|
|
638
|
+
variant: "borderless",
|
|
639
639
|
onChange: handleChange
|
|
640
640
|
}
|
|
641
641
|
), /* @__PURE__ */ React19.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React19.createElement(RightOutlined, null)));
|