|
<div class="col-lg-6 control-section">
<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
<ScheduleEvents TValue="AppointmentData" Navigating="OnNavigating"></ScheduleEvents>
<ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
</SfSchedule>
</div>
<div class="col-lg-6 control-section">
<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate2">
<ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
</SfSchedule>
</div>
DateTime CurrentDate = new DateTime(2020, 2, 14);
DateTime CurrentDate2 = new DateTime(2020, 2, 14).AddDays(7);
public void OnNavigating(NavigatingEventArgs args)
{
if (args.Action == "date")
{
CurrentDate2 = args.CurrentDate.AddDays(7);
}
} |
|
@using Syncfusion.Blazor.Buttons
<SfButton Content="Show/Hide" @onclick="OnButtonClick"></SfButton>
@if (isShow) {
<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate2">
<ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
</SfSchedule>
}
bool isShow = false; public void OnButtonClick()
{
isShow = !isShow;
} |