@energycap/components 0.39.36-ECAP-26840-date-input.20241121-0843 → 0.39.36-ECAP-26840-date-input.20241121-1605
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.
@@ -4093,6 +4093,8 @@ class DateInputComponent extends FormControlBase {
|
|
4093
4093
|
this.calendarSelection = selection;
|
4094
4094
|
if (isCalendarSelectionSingleDate(selection)) {
|
4095
4095
|
this.formModel.setValue(selection);
|
4096
|
+
this.isCalendarOpen = false;
|
4097
|
+
this.focusInput();
|
4096
4098
|
}
|
4097
4099
|
}
|
4098
4100
|
onTextboxBlur() {
|
@@ -4131,7 +4133,7 @@ class DateInputComponent extends FormControlBase {
|
|
4131
4133
|
this.onTextboxValueChanges();
|
4132
4134
|
// Sync the initial disabled status and value of the textbox
|
4133
4135
|
this.syncTextboxControlDisabledStatus(this.formModel.status);
|
4134
|
-
this.textboxControl.setValue(this.dateDisplayPipe.transform(this.formModel.value), { emitEvent: false });
|
4136
|
+
this.textboxControl.setValue(this.dateDisplayPipe.transform(this.formModel.value, true), { emitEvent: false });
|
4135
4137
|
this.calendarSelection = this.formModel.value;
|
4136
4138
|
}
|
4137
4139
|
onFormModelStatusChanges() {
|
@@ -4152,7 +4154,7 @@ class DateInputComponent extends FormControlBase {
|
|
4152
4154
|
// Update the calendar selection textbox value with a formatted date when the form model changes.
|
4153
4155
|
// This is usually triggered by programmatic changes to the form model by a parent component.
|
4154
4156
|
this.formModel.valueChanges.pipe(distinctUntilChanged((a, b) => moment(a).isSame(b, 'day')), takeUntil(this.componentDestroyed)).subscribe(value => {
|
4155
|
-
const displayValue = this.dateDisplayPipe.transform(value);
|
4157
|
+
const displayValue = this.dateDisplayPipe.transform(value, true);
|
4156
4158
|
// Don't emit an event when setting the textbox value to avoid circular updates between the textbox and form model.
|
4157
4159
|
this.textboxControl.setValue(displayValue, { emitEvent: false });
|
4158
4160
|
this.calendarSelection = value;
|