lizaui 9.0.9 → 9.0.11

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.
@@ -671,7 +671,10 @@ const CalendarPicker = ({
671
671
  type = "date-picker",
672
672
  size = "md",
673
673
  tileContent = null,
674
- showActionButtons = true
674
+ showActionButtons = true,
675
+ dayPlaceholder = "dd",
676
+ monthPlaceholder = "mm",
677
+ yearPlaceholder = "yyyy"
675
678
  }) => {
676
679
  const [show, setShow] = React.useState(showCalendar);
677
680
  const inputRef = React.useRef(0);
@@ -693,7 +696,11 @@ const CalendarPicker = ({
693
696
  const handleChangeToDay = () => {
694
697
  const dateNow = /* @__PURE__ */ new Date();
695
698
  const date = new Date(dateNow.getFullYear(), dateNow.getMonth(), dateNow.getDate(), 0, 0, 0);
696
- handleChange(date);
699
+ if (type === "date-range-picker") {
700
+ handleChange([date, date]);
701
+ } else {
702
+ handleChange(date);
703
+ }
697
704
  };
698
705
  const handleCloseCalendar = () => {
699
706
  if (disabled) return;
@@ -770,7 +777,7 @@ const CalendarPicker = ({
770
777
  CalendarStyle,
771
778
  {
772
779
  color,
773
- className: tailwindMerge.twMerge(classNameContainer, "relative"),
780
+ className: tailwindMerge.twMerge(classNameContainer, "relative date-picker-component-container"),
774
781
  onClick: handleOpenCalendar,
775
782
  showcalendar: show.toString(),
776
783
  id: uui,
@@ -805,9 +812,9 @@ const CalendarPicker = ({
805
812
  onKeyDown,
806
813
  onKeyUp,
807
814
  onBlur,
808
- dayPlaceholder: "DD",
809
- monthPlaceholder: "MM",
810
- yearPlaceholder: "YYYY"
815
+ dayPlaceholder,
816
+ monthPlaceholder,
817
+ yearPlaceholder
811
818
  }
812
819
  ) : /* @__PURE__ */ jsxRuntime.jsx(
813
820
  DateRangePicker,
@@ -829,9 +836,9 @@ const CalendarPicker = ({
829
836
  isOpen: false,
830
837
  onKeyDown,
831
838
  onKeyUp,
832
- dayPlaceholder: "DD",
833
- monthPlaceholder: "MM",
834
- yearPlaceholder: "YYYY"
839
+ dayPlaceholder,
840
+ monthPlaceholder,
841
+ yearPlaceholder
835
842
  }
836
843
  ),
837
844
  !disabled && error ? /* @__PURE__ */ jsxRuntime.jsx(labelError.LabelError, { text: error }) : null