novo-elements 7.4.0-next.1 → 7.4.0-next.2

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.
@@ -37748,8 +37748,7 @@ class NovoDatePickerElement {
37748
37748
  break;
37749
37749
  case 'range':
37750
37750
  case 'week':
37751
- const range = this.model;
37752
- this.selection = [range.startDate, range.endDate].filter(Boolean);
37751
+ this.setRangeSelection();
37753
37752
  break;
37754
37753
  case 'single':
37755
37754
  default:
@@ -37764,8 +37763,7 @@ class NovoDatePickerElement {
37764
37763
  this.selection = this.model;
37765
37764
  }
37766
37765
  if (this.mode === 'range') {
37767
- const range = this.model;
37768
- this.selection = [range.startDate, range.endDate].filter(Boolean);
37766
+ this.setRangeSelection();
37769
37767
  }
37770
37768
  if (Helpers.isDate(model)) {
37771
37769
  this.updateView(model);
@@ -37779,6 +37777,16 @@ class NovoDatePickerElement {
37779
37777
  }
37780
37778
  }
37781
37779
  }
37780
+ setRangeSelection() {
37781
+ if (this.model?.hasOwnProperty('startDate')) {
37782
+ const range = this.model;
37783
+ this.selection = [range.startDate, range.endDate].filter(Boolean);
37784
+ }
37785
+ else if (this.model?.hasOwnProperty('min')) {
37786
+ const range = this.model;
37787
+ this.selection = [range.min, range.max].filter(Boolean);
37788
+ }
37789
+ }
37782
37790
  registerOnChange(fn) {
37783
37791
  this._onChange = fn;
37784
37792
  }