@energycap/components 0.41.1-ECAP-26841-date-input-features.20250106-0847 → 0.41.1-ECAP-26841-date-input-features.20250108-1149
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.
@@ -5002,7 +5002,7 @@ class DateInputComponent extends FormControlBase {
|
|
5002
5002
|
this.parseFormats = DateTimeHelper.getMomentParseFormats();
|
5003
5003
|
}
|
5004
5004
|
ngOnChanges(changes) {
|
5005
|
-
if (changes.selectionMode) {
|
5005
|
+
if (changes.selectionMode && !changes.selectionMode.isFirstChange()) {
|
5006
5006
|
this.onSelectionModeChange(this.selectionMode);
|
5007
5007
|
}
|
5008
5008
|
}
|
@@ -5023,6 +5023,7 @@ class DateInputComponent extends FormControlBase {
|
|
5023
5023
|
this.calendarSelection = this.formModel.value;
|
5024
5024
|
this.updateCalendars(this.calendarSelection);
|
5025
5025
|
this.updateSteppers(this.calendarSelection);
|
5026
|
+
console.log(this.calendarSelection);
|
5026
5027
|
}
|
5027
5028
|
/** Focuses the input whenever the calendar is shift-tabbed out of. */
|
5028
5029
|
onCalendarFocusOutStart() {
|
@@ -5096,6 +5097,7 @@ class DateInputComponent extends FormControlBase {
|
|
5096
5097
|
this.textboxGroup.patchValue(displayValue, { emitEvent: false });
|
5097
5098
|
this.formModel.patchValue(newSelection, { emitEvent: false });
|
5098
5099
|
this.calendarSelection = newSelection;
|
5100
|
+
this.updateSteppers(newSelection);
|
5099
5101
|
// Close the calendar if the selection mode is not a range mode where either the start or the end date can be changed.
|
5100
5102
|
if (!this.selectionStrategy.showSecondaryTextbox) {
|
5101
5103
|
this.isCalendarOpen = false;
|
@@ -5307,6 +5309,7 @@ class DateInputComponent extends FormControlBase {
|
|
5307
5309
|
updateSteppers(value) {
|
5308
5310
|
// Disable the steppers if we either don't have a selection or only have one date in the selection.
|
5309
5311
|
if (!value ||
|
5312
|
+
(DateInput.isSelectionSingleDate(value) && this.selectionMode !== 'day') ||
|
5310
5313
|
(DateInput.isSelectionRange(value) && (!value.start || !value.end))) {
|
5311
5314
|
this.disableSteppers = true;
|
5312
5315
|
}
|