Warm tip: This article is reproduced from serverfault.com, please click

Highlight startDate in CalendarDateInterval Control

发布于 2016-11-18 11:35:23

i've set the start Date in the CalendarDateInterval Control with

self.getView().byId("calendar").setStartDate(DeliveryDate); //DeliveryDate = 25. October

now it looks like this:

enter image description here

That's ok because now it's in my focus. But i want to highlight the start date like this

enter image description here

It is only highlighted with a click. Any idea?

Questioner
alexP
Viewed
0
alexP 2016-11-18 21:56:21

Here is the solution:

var cal = this.byId("calendar")
cal.focusDate(DeliveryDate); 
cal.insertSelectedDate(new DateTypeRange({ startDate : DeliveryDate }));