@apexcura/ui-components 0.0.15-Beta52 → 0.0.15-Beta53

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 CHANGED
@@ -861,31 +861,32 @@ var DatePickerElement = (props) => {
861
861
  };
862
862
  const disabledTime = (date) => {
863
863
  if (!date) return {};
864
- if (props.enabled_dates === "from_today" && date.isSame((0, import_dayjs.default)(), "day")) {
865
- const currentHour = (0, import_dayjs.default)().hour();
866
- const currentMinute = (0, import_dayjs.default)().minute();
867
- return {
868
- disabledHours: () => [...Array(24).keys()].slice(0, currentHour),
869
- disabledMinutes: (hour) => {
870
- if (hour === currentHour) {
871
- return [...Array(60).keys()].slice(0, currentMinute + 1);
864
+ const currentHour = (0, import_dayjs.default)().hour();
865
+ const currentMinute = (0, import_dayjs.default)().minute();
866
+ if (props.enabled_dates === "from_today") {
867
+ if (date.isSame((0, import_dayjs.default)(), "day")) {
868
+ return {
869
+ disabledHours: () => [...Array(24).keys()].slice(0, currentHour),
870
+ disabledMinutes: (hour) => {
871
+ if (hour === currentHour) {
872
+ return [...Array(60).keys()].slice(0, currentMinute + 1);
873
+ }
874
+ return [];
872
875
  }
873
- return [];
874
- }
875
- };
876
- }
877
- if ((props.enabled_dates === "till_today" || !props.enabled_dates) && date.isSame((0, import_dayjs.default)(), "day")) {
878
- const currentHour = (0, import_dayjs.default)().hour();
879
- const currentMinute = (0, import_dayjs.default)().minute();
880
- return {
881
- disabledHours: () => [...Array(24).keys()].slice(currentHour + 1, 24),
882
- disabledMinutes: (hour) => {
883
- if (hour === currentHour) {
884
- return [...Array(60).keys()].slice(currentMinute + 1, 60);
876
+ };
877
+ }
878
+ } else if (props.enabled_dates === "till_today" || !props.enabled_dates) {
879
+ if (date.isSame((0, import_dayjs.default)(), "day")) {
880
+ return {
881
+ disabledHours: () => [...Array(24).keys()].slice(currentHour + 1, 24),
882
+ disabledMinutes: (hour) => {
883
+ if (hour === currentHour) {
884
+ return [...Array(60).keys()].slice(currentMinute + 1, 60);
885
+ }
886
+ return [];
885
887
  }
886
- return [];
887
- }
888
- };
888
+ };
889
+ }
889
890
  }
890
891
  return {};
891
892
  };
package/dist/index.mjs CHANGED
@@ -792,31 +792,32 @@ var DatePickerElement = (props) => {
792
792
  };
793
793
  const disabledTime = (date) => {
794
794
  if (!date) return {};
795
- if (props.enabled_dates === "from_today" && date.isSame(dayjs(), "day")) {
796
- const currentHour = dayjs().hour();
797
- const currentMinute = dayjs().minute();
798
- return {
799
- disabledHours: () => [...Array(24).keys()].slice(0, currentHour),
800
- disabledMinutes: (hour) => {
801
- if (hour === currentHour) {
802
- return [...Array(60).keys()].slice(0, currentMinute + 1);
795
+ const currentHour = dayjs().hour();
796
+ const currentMinute = dayjs().minute();
797
+ if (props.enabled_dates === "from_today") {
798
+ if (date.isSame(dayjs(), "day")) {
799
+ return {
800
+ disabledHours: () => [...Array(24).keys()].slice(0, currentHour),
801
+ disabledMinutes: (hour) => {
802
+ if (hour === currentHour) {
803
+ return [...Array(60).keys()].slice(0, currentMinute + 1);
804
+ }
805
+ return [];
803
806
  }
804
- return [];
805
- }
806
- };
807
- }
808
- if ((props.enabled_dates === "till_today" || !props.enabled_dates) && date.isSame(dayjs(), "day")) {
809
- const currentHour = dayjs().hour();
810
- const currentMinute = dayjs().minute();
811
- return {
812
- disabledHours: () => [...Array(24).keys()].slice(currentHour + 1, 24),
813
- disabledMinutes: (hour) => {
814
- if (hour === currentHour) {
815
- return [...Array(60).keys()].slice(currentMinute + 1, 60);
807
+ };
808
+ }
809
+ } else if (props.enabled_dates === "till_today" || !props.enabled_dates) {
810
+ if (date.isSame(dayjs(), "day")) {
811
+ return {
812
+ disabledHours: () => [...Array(24).keys()].slice(currentHour + 1, 24),
813
+ disabledMinutes: (hour) => {
814
+ if (hour === currentHour) {
815
+ return [...Array(60).keys()].slice(currentMinute + 1, 60);
816
+ }
817
+ return [];
816
818
  }
817
- return [];
818
- }
819
- };
819
+ };
820
+ }
820
821
  }
821
822
  return {};
822
823
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.15-Beta52",
3
+ "version": "0.0.15-Beta53",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",