Hi I cannot seem to prevent the scheduler popups from opening.
I have tried with a Blazor function and using Javascript interop - but neither seems to work.
Using Blazor function
@page "/"
@inject IJSRuntime JsRuntime
@using Syncfusion.EJ2.RazorComponents.Schedule
@inherits IndexModel
<EjsSchedule id="schedule" height="650px" selectedDate="DateTime.UtcNow" FirstDayOfWeek="1" ShowWeekNumber="false" CurrentView="View.Month" EventSettings="@ScheduleData" PopupOpen="@CancelPopup">
<ScheduleViews>
<ScheduleView option='@WeekView' startHour='@WeekStartHour' endHour='@WeekEndHour'></ScheduleView>
<ScheduleView option='@WorkWeekView' startHour='@WorkWeekStartHour' endHour='@WorkWeekEndHour'></ScheduleView>
<ScheduleView option='@MonthView' showWeekend='true' EventTemplate="#event-template">
</ScheduleView>
<ScheduleView option="@DayView"></ScheduleView>
</ScheduleViews>
</EjsSchedule>
@functions{
public void CancelPopup(PopupOpenEventArgs args)
{
args.Cancel = true;
}
}
using Javascript interop
@page "/"
@inject IJSRuntime JsRuntime
@using Syncfusion.EJ2.RazorComponents.Schedule
@inherits IndexModel
<EjsSchedule id="schedule" height="650px" selectedDate="DateTime.UtcNow" FirstDayOfWeek="1" ShowWeekNumber="false" CurrentView="View.Month" EventSettings="@ScheduleData" PopupOpen="@CancelPopup">
<ScheduleViews>
<ScheduleView option='@WeekView' startHour='@WeekStartHour' endHour='@WeekEndHour'></ScheduleView>
<ScheduleView option='@WorkWeekView' startHour='@WorkWeekStartHour' endHour='@WorkWeekEndHour'></ScheduleView>
<ScheduleView option='@MonthView' showWeekend='true' EventTemplate="#event-template">
</ScheduleView>
<ScheduleView option="@DayView"></ScheduleView>
</ScheduleViews>
</EjsSchedule>
@functions{
public void CancelPopup(PopupOpenEventArgs args)
{
JsRuntime.InvokeAsync<bool>("genericCancel", args);
}
}
... on my _Host.cshtml page
<script type="text/javascript">
function genericCancel(args) {
args.cancel = true;
}
</script>
Any Ideas?
Also, anything above v17.1.0.47-beta seems to crash the scheduler after a couple of clicks.
Thanks, would really love to use the Blazor components, but this is a bit of a show-stopper if I cannot prevent the popup.