使用Ektron 9.0 SP2
是否可以在日视图中更改Ektron WebCalendar的时间范围?显示的时间段是从上午8点到下午5点的小时。我想知道是否可以更改范围,如果是,则如何应用此更改。我查看了Ektron Web Reference文档并浏览了WebCalendar属性,但找不到任何有用的东西。
提前感谢您的任何意见。
答案 0 :(得分:0)
我意识到我试图改变的是Telerik RadScheduler的一个属性,即Ektron WebCalendar的基础。通过一些反复试验,我终于可以到达RadSchedular并编辑其DayStartTime和DayEndTime属性来更改WebCalendar日视图的小时范围。
以下是我用来查找RadScheduler的代码。
//Using a foreach loop through the WebCalendar as I am not sure if the order of its Controls property changes at all, but we want the UpdatePanel as that holds the RadScheduler.
foreach (Control control in uxWebCalendar.Controls)
{
if (control is UpdatePanel)
{
Control subControl = control;
Control subSubControl = subControl.Controls[0];
Telerik.Web.UI.RadScheduler radScheduler = subSubControl.Controls[0] as Telerik.Web.UI.RadScheduler;
//This results makes is to set the start time as 7am
TimeSpan timeStart = new TimeSpan(0, 7, 0, 0, 0);
//To show the 8pm slot, you have to end the time at 9pm
TimeSpan timeEnd = new TimeSpan(0, 21, 0, 0, 0);
radScheduler.DayStartTime = timeStart;
radScheduler.DayEndTime = timeEnd;
break;
}
}