@shival99/z-ui 1.3.6 → 1.3.7

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.
@@ -2764,65 +2764,33 @@ class ZCalendarComponent {
2764
2764
  const columnsArray = Array.from(timeColumns);
2765
2765
  if (this.isRangeMode()) {
2766
2766
  const columnsPerSection = (this.zShowHour() ? 1 : 0) + (this.zShowMinute() ? 1 : 0) + (this.zShowSecond() ? 1 : 0);
2767
- const start = this._rangeStart();
2768
- if (start) {
2769
- let columnIndex = 0;
2770
- if (this.zShowHour()) {
2771
- const hourColumn = columnsArray[columnIndex];
2772
- if (hourColumn) {
2773
- const hourValue = this.zTimeFormat() === '12h' ? this.displayHour() - 1 : this._hour();
2774
- hourColumn.scrollTop = hourValue * itemHeight;
2775
- }
2776
- columnIndex++;
2777
- }
2778
- if (this.zShowMinute()) {
2779
- const minuteColumn = columnsArray[columnIndex];
2780
- if (minuteColumn) {
2781
- minuteColumn.scrollTop = this._minute() * itemHeight;
2782
- }
2783
- columnIndex++;
2784
- }
2785
- if (this.zShowSecond()) {
2786
- const secondColumn = columnsArray[columnIndex];
2787
- if (secondColumn) {
2788
- secondColumn.scrollTop = this._second() * itemHeight;
2789
- }
2767
+ let columnIndex = 0;
2768
+ if (this.zShowHour()) {
2769
+ const hourColumn = columnsArray[columnIndex];
2770
+ if (hourColumn) {
2771
+ const hourValue = this.zTimeFormat() === '12h' ? this.displayHour() - 1 : this._hour();
2772
+ hourColumn.scrollTop = hourValue * itemHeight;
2790
2773
  }
2774
+ columnIndex++;
2791
2775
  }
2792
- const end = this._rangeEnd();
2793
- if (end) {
2794
- let columnIndex = columnsPerSection;
2795
- if (this.zShowHour()) {
2796
- const hourColumn = columnsArray[columnIndex];
2797
- if (hourColumn) {
2798
- const hourValue = this.zTimeFormat() === '12h' ? this.displayHourEnd() - 1 : this._hourEnd();
2799
- hourColumn.scrollTop = hourValue * itemHeight;
2800
- }
2801
- columnIndex++;
2802
- }
2803
- if (this.zShowMinute()) {
2804
- const minuteColumn = columnsArray[columnIndex];
2805
- if (minuteColumn) {
2806
- minuteColumn.scrollTop = this._minuteEnd() * itemHeight;
2807
- }
2808
- columnIndex++;
2776
+ if (this.zShowMinute()) {
2777
+ const minuteColumn = columnsArray[columnIndex];
2778
+ if (minuteColumn) {
2779
+ minuteColumn.scrollTop = this._minute() * itemHeight;
2809
2780
  }
2810
- if (this.zShowSecond()) {
2811
- const secondColumn = columnsArray[columnIndex];
2812
- if (secondColumn) {
2813
- secondColumn.scrollTop = this._secondEnd() * itemHeight;
2814
- }
2781
+ columnIndex++;
2782
+ }
2783
+ if (this.zShowSecond()) {
2784
+ const secondColumn = columnsArray[columnIndex];
2785
+ if (secondColumn) {
2786
+ secondColumn.scrollTop = this._second() * itemHeight;
2815
2787
  }
2816
2788
  }
2817
- return;
2818
- }
2819
- const selected = this._selectedDate();
2820
- if (selected) {
2821
- let columnIndex = 0;
2789
+ columnIndex = columnsPerSection;
2822
2790
  if (this.zShowHour()) {
2823
2791
  const hourColumn = columnsArray[columnIndex];
2824
2792
  if (hourColumn) {
2825
- const hourValue = this.zTimeFormat() === '12h' ? this.displayHour() - 1 : this._hour();
2793
+ const hourValue = this.zTimeFormat() === '12h' ? this.displayHourEnd() - 1 : this._hourEnd();
2826
2794
  hourColumn.scrollTop = hourValue * itemHeight;
2827
2795
  }
2828
2796
  columnIndex++;
@@ -2830,16 +2798,39 @@ class ZCalendarComponent {
2830
2798
  if (this.zShowMinute()) {
2831
2799
  const minuteColumn = columnsArray[columnIndex];
2832
2800
  if (minuteColumn) {
2833
- minuteColumn.scrollTop = this._minute() * itemHeight;
2801
+ minuteColumn.scrollTop = this._minuteEnd() * itemHeight;
2834
2802
  }
2835
2803
  columnIndex++;
2836
2804
  }
2837
2805
  if (this.zShowSecond()) {
2838
2806
  const secondColumn = columnsArray[columnIndex];
2839
2807
  if (secondColumn) {
2840
- secondColumn.scrollTop = this._second() * itemHeight;
2808
+ secondColumn.scrollTop = this._secondEnd() * itemHeight;
2841
2809
  }
2842
2810
  }
2811
+ return;
2812
+ }
2813
+ let columnIndex = 0;
2814
+ if (this.zShowHour()) {
2815
+ const hourColumn = columnsArray[columnIndex];
2816
+ if (hourColumn) {
2817
+ const hourValue = this.zTimeFormat() === '12h' ? this.displayHour() - 1 : this._hour();
2818
+ hourColumn.scrollTop = hourValue * itemHeight;
2819
+ }
2820
+ columnIndex++;
2821
+ }
2822
+ if (this.zShowMinute()) {
2823
+ const minuteColumn = columnsArray[columnIndex];
2824
+ if (minuteColumn) {
2825
+ minuteColumn.scrollTop = this._minute() * itemHeight;
2826
+ }
2827
+ columnIndex++;
2828
+ }
2829
+ if (this.zShowSecond()) {
2830
+ const secondColumn = columnsArray[columnIndex];
2831
+ if (secondColumn) {
2832
+ secondColumn.scrollTop = this._second() * itemHeight;
2833
+ }
2843
2834
  }
2844
2835
  }, 0);
2845
2836
  }