Skip to Content
-1
Oct 15, 2019 at 02:49 PM

SAPUI5 two Calendars setter and getter Issues

59 Views

Hello,

look the Code below

this.byId("FirstCalendar").getDateValue().getMonth()
3
this.byId("SecondCalendar").getDateValue().getMonth()
3
this.byId("SecondCalendar").getDateValue().setMonth(this.byId("FirstCalendar").getDateValue().getMonth()+3)
1627084800000
this.byId("SecondCalendar").getDateValue().getMonth()
6
this.byId("FirstCalendar").getDateValue().getMonth()
6

.setMonth, changes the month of both Calendars for no reason.

Why do you think that is the Case?