Class ScheduleWorkHours
A class that represents the work hours configurations on SfSchedule<TValue> component.
Inherited Members
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public class ScheduleWorkHours : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Remarks
You can configure the work hours by specifying values for the corresponding properties. workhours can be applied for Day, Week, WorkWeek, TimelineDay, TimelineWeek and TimelineWorkWeek views.
Examples
The following code example shows how to configure the work hours:
<SfSchedule TValue="AppointmentData">
<ScheduleWorkHours Start="08:00" End="20:00"></ScheduleWorkHours>
</SfSchedule>
Constructors
ScheduleWorkHours()
Declaration
public ScheduleWorkHours()
Properties
End
Gets or sets the time string in short skeleton format HH:mm, which usually denotes the end of the working hour range.
Declaration
[Parameter]
public string End { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string value representing the time. The default value is |
Highlight
Gets or sets a value indicating whether the cells of the working hour range should be highlighted with an active color.
Declaration
[Parameter]
public bool Highlight { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Start
Gets or sets the time string in short skeleton format HH:mm, which usually denotes the start of the working hour range.
Declaration
[Parameter]
public string Start { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string value representing the time. The default value is |
Methods
Dispose(bool)
Dispose unmanaged resources in the Syncfusion Blazor component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | Boolean value to dispose the object. |
Overrides
OnInitializedAsync()
Initializes the ScheduleWorkHours component during the component initialization phase.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |
Overrides
Remarks
This method performs the following initialization tasks:
- Calls the base OnInitializedAsync method
- Updates the parent component with the ScheduleWorkHours configuration
- Caches the current values of all work hours properties for change detection
OnParametersSetAsync()
Handles parameter changes for the ScheduleWorkHours component.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |
Overrides
Remarks
This method is called whenever component parameters change. It performs the following operations:
- Calls the base OnParametersSetAsync method
- Detects changes in any of the work hours properties (End, Highlight, Start)
- Updates the cached property values when changes are detected
- Notifies the parent component of the property changes