cancel
Showing results for 
Search instead for 
Did you mean: 

In the UI5 Sample App "Single Planning Calendar" How Do I Set the Default View?

Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Kudos

I downloaded the Single Planning Calendar sample app from the UI5 Demo Kit and I would like to have the default view be the Month.  I've been trying to figure out how to set the view using setKey() but I'm not sure where to do that.

I've been looking at the code for a few hours and I can't even figure out how the app changes it by clicking the different buttons.

In the Page.view.xml file I see this code in the <view> section:

<SinglePlanningCalendarDayView key="DayView" title="Day" />
<SinglePlanningCalendarWorkWeekView key="WorkWeekView" title="Work Week" />
<SinglePlanningCalendarWeekView key="WeekView" title="Week" />
 <SinglePlanningCalendarMonthView key="MonthView" title="Month" />
 
I tried commenting out the first 3 views but it still defaulted to the first one.

Any ideas and/or suggestions would be greatly appreciated.

Thanks in advance!

Cheers!

Ron

Accepted Solutions (1)

Accepted Solutions (1)

Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Kudos

So I finally managed to find out that in the Page.view.xml file in the webapp folder, if I set the Month view as the first one in the list of views, that makes it the default.  🙂

Answers (0)