Hi,
You can set the units and the format of the timelines in a Resource view through the respective properties in Calendar.ResourceViewSettings - BottomTimelineSettings, MiddleTimelineSettings, and TopTimelineSettings. For example, to setup the middle timeline to display days and the bottom timeline to display hours (both with the appropriate formatting), use the following code:
calendar.ResourceViewSettings.MiddleTimelineSettings.Unit = TimeUnit.Day;
calendar.ResourceViewSettings.MiddleTimelineSettings.Format = "dd MMM";
calendar.ResourceViewSettings.BottomTimelineSettings.Unit = TimeUnit.Hour;
calendar.ResourceViewSettings.BottomTimelineSettings.Format = "HH:mm";
If you don't need the middle timeline, set Calendar.ResourceViewSettings.Timelines to 1. In addition, you may also want to set ScrollStep and SnapUnit to more appropriate values for the new view resolution, for example one hour:
calendar.ResourceViewSettings.ScrollStep = TimeSpan.FromHours(1);
calendar.ResourceViewSettings.SnapUnit = TimeUnit.Hour;
Finally, to display only a single day, set the Calendar.EndDate property. Optionally set Calendar.ResourceViewSettings.ShowPaddingDates to Disabled if you don't want the hours from the following day to be visible in case there is extra space available:
calendar.EndDate = calendar.Date.AddDays(1);
I hope this helps.
Regards,
Meppy