How to set non-working hours in WinUI Scheduler (Calendar)?
To set the non-working hours in a schedule view, use the SpecialTimeRegions property in the WinUI Scheduler.
C#
In the Scheduler, add the non-working time collection to the SpecialTimeRegions property of the DaysViewSettings.
scheduler.DaysViewSettings.SpecialTimeRegions.Add(new SpecialTimeRegion
{
StartTime = DateTime.MinValue.AddHours(0),
EndTime = DateTime.MinValue.AddHours(9),
RecurrenceRule = "FREQ=DAILY;INTERVAL=1"
});
scheduler.DaysViewSettings.SpecialTimeRegions.Add(new SpecialTimeRegion
{
StartTime = DateTime.MinValue.AddHours(18),
EndTime = DateTime.MinValue.AddHours(23),
RecurrenceRule = "FREQ=DAILY;INTERVAL=1"
});
XAML
Set the Scheduler ViewType property as Day.
<Grid x:Name="grid"> <syncfusion:SfScheduler x:Name="scheduler" ViewType="Day" > </syncfusion:SfScheduler> </Grid>

Conclusion
I hope you enjoyed learning about how to set non-working hours in WinUI Scheduler (Calendar).
You can refer to
our WinUI
Scheduler feature
tour page to know about its other
groundbreaking feature representations and documentation, and
how to quickly get started for configuration specifications. You can also
explore our
WinUI Scheduler example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!