From 7efe9d9703f28da4e1a760debee275d3299c1a5e Mon Sep 17 00:00:00 2001 From: Roberto Orden Erena Date: Tue, 26 Mar 2024 08:10:49 +0100 Subject: [PATCH] Update calendar.ts Calendar by range showing the end date at first, else the start date --- src/app/components/calendar/calendar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index e52f3574020..b13f6e88c85 100644 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -2803,7 +2803,7 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { updateUI() { let propValue = this.value; if (Array.isArray(propValue)) { - propValue = propValue[0]; + propValue = propValue.length === 2 ? propValue[1] : propValue[0]; } let val = this.defaultDate && this.isValidDate(this.defaultDate) && !this.value ? this.defaultDate : propValue && this.isValidDate(propValue) ? propValue : new Date();