<ScheduleTimeScale Interval="240" SlotCount="1">
<MajorSlotTemplate>
@{
var currTime = majorSlotTemplate((context as TemplateArgs).Date);
var nextTime = Convert.ToInt32(currTime) + 4;
<div>@(currTime + "h - " + nextTime + "h")</div>
}
</MajorSlotTemplate>
</ScheduleTimeScale>
…
public static string majorSlotTemplate(DateTime date)
{
return date.ToString("hh", frFr);
} |
<DateHeaderTemplate>
<div class="date-text">@(getDateHeaderText((context as TemplateArgs).Date))</div>
</DateHeaderTemplate>
..
static CultureInfo frFr = new CultureInfo("fr-FR");
public static string getDateHeaderText(DateTime date)
{
return date.ToString("dddd, dd MMM", frFr);
} |