@websy/websy-designs 1.2.13 → 1.2.14
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.
|
@@ -206,10 +206,11 @@ class WebsyDatePicker {
|
|
|
206
206
|
this.validDates = []
|
|
207
207
|
this.validYears = []
|
|
208
208
|
this.validHours = []
|
|
209
|
-
this.customRangeSelected = true
|
|
209
|
+
this.customRangeSelected = true
|
|
210
210
|
this.shiftPressed = false
|
|
211
211
|
const DEFAULTS = {
|
|
212
212
|
defaultRange: 0,
|
|
213
|
+
dateFormat: '%_m/%_d/%Y',
|
|
213
214
|
allowClear: true,
|
|
214
215
|
hideRanges: false,
|
|
215
216
|
minAllowedDate: this.floorDate(new Date(new Date((new Date().setFullYear(new Date().getFullYear() - 1))).setDate(1))),
|
|
@@ -408,10 +409,10 @@ class WebsyDatePicker {
|
|
|
408
409
|
this.updateRange()
|
|
409
410
|
}
|
|
410
411
|
else {
|
|
411
|
-
this.selectedRangeDates = [...this.priorSelectedDates]
|
|
412
|
+
this.selectedRangeDates = [...(this.priorSelectedDates || [])]
|
|
412
413
|
this.selectedRange = this.priorSelectedRange
|
|
413
414
|
this.customRangeSelected = this.priorCustomRangeSelected
|
|
414
|
-
this.currentselection = [...this.priorselection]
|
|
415
|
+
this.currentselection = [...(this.priorselection || [])]
|
|
415
416
|
this.highlightRange()
|
|
416
417
|
}
|
|
417
418
|
}
|
|
@@ -283,6 +283,7 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
283
283
|
this.shiftPressed = false;
|
|
284
284
|
var DEFAULTS = {
|
|
285
285
|
defaultRange: 0,
|
|
286
|
+
dateFormat: '%_m/%_d/%Y',
|
|
286
287
|
allowClear: true,
|
|
287
288
|
hideRanges: false,
|
|
288
289
|
minAllowedDate: this.floorDate(new Date(new Date(new Date().setFullYear(new Date().getFullYear() - 1)).setDate(1))),
|
|
@@ -452,10 +453,10 @@ var WebsyDatePicker = /*#__PURE__*/function () {
|
|
|
452
453
|
|
|
453
454
|
this.updateRange();
|
|
454
455
|
} else {
|
|
455
|
-
this.selectedRangeDates = _toConsumableArray(this.priorSelectedDates);
|
|
456
|
+
this.selectedRangeDates = _toConsumableArray(this.priorSelectedDates || []);
|
|
456
457
|
this.selectedRange = this.priorSelectedRange;
|
|
457
458
|
this.customRangeSelected = this.priorCustomRangeSelected;
|
|
458
|
-
this.currentselection = _toConsumableArray(this.priorselection);
|
|
459
|
+
this.currentselection = _toConsumableArray(this.priorselection || []);
|
|
459
460
|
this.highlightRange();
|
|
460
461
|
}
|
|
461
462
|
}
|