DxRangeSelectorScale.Holidays Property
Specifies dates that DxRangeSelector marks as holidays.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public object[] Holidays { get; set; }
Property Value
Type | Description |
---|---|
Object[] | An array of DateTime objects. |
Remarks
Enable the WorkdaysOnly option to display only workdays on the scale. Use the Holidays
property to mark additional dates as holidays and exclude them from available values.
The following code snippet marks specific weekend dates as workdays and work week dates as holidays and uses the checkbox to display only workdays on the scale:
<DxCheckBox @bind-Checked="showWorkDays" T="bool">Show Workdays Only</DxCheckBox>
<DxRangeSelector Width="1100px"
Height="200px"
SelectedRangeStartValue="@(new DateTime(2024, 2, 1))"
SelectedRangeEndValue="@(new DateTime(2024, 2, 14))">
<DxRangeSelectorScale StartValue="@(new DateTime(2024, 1, 1))"
EndValue="@(new DateTime(2024, 3, 1))"
TickInterval="ChartAxisInterval.Day"
MinRange="ChartAxisInterval.Week"
MaxRange="ChartAxisInterval.Month"
WorkdaysOnly="showWorkDays"
WorkDates="@(new object[]{new DateTime(2024, 2, 3),
new DateTime(2024, 2, 10)})"
Holidays="@(new object[]{new DateTime(2024, 1, 4),
new DateTime(2024, 1, 5),
new DateTime(2024, 1, 12)})"
ValueType="ChartAxisDataType.DateTime">
<DxRangeSelectorScaleMarker>
<DxRangeSelectorScaleMarkerLabel>
<DxTextFormatSettings Type="TextFormat.MonthAndYear" />
</DxRangeSelectorScaleMarkerLabel>
</DxRangeSelectorScaleMarker>
</DxRangeSelectorScale>
<DxRangeSelectorSliderMarker>
<DxTextFormatSettings Type="TextFormat.MonthAndDay" />
</DxRangeSelectorSliderMarker>
</DxRangeSelector>
@code {
bool showWorkDays = false;
}
See Also