Hi Lukas,
Thanks for contacting Syncfusion support.
Based on the information you have provided, we suspect you want to disable certain dates in the calendar so you can select only available dates. If that's the case, we recommend using the OnRenderDayCell event to disable specific days, as seen in the code snippet below. You can disable unique dates by comparing the date returned in the OnRenderDayCell argument.
|
<SfCalendar TValue="DateTime?" @bind-Value="DateValue">
<CalendarEvents TValue="DateTime?" OnRenderDayCell="onRenderDayCellHandler"></CalendarEvents>
</SfCalendar>
@code{
public DateTime? DateValue { get; set; }
public void onRenderDayCellHandler(RenderDayCellEventArgs args)
{
if (args.Date.DayOfWeek.ToString() == "Monday" || args.Date.DayOfWeek.ToString() == "Friday")
{
args.IsDisabled = true;
}
}
} |
Regards,
Ponmani M