We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I Prevent Popup with PopupOpen?

Thread ID:

Created:

Updated:

Platform:

Replies:

144913 May 28,2019 12:30 PM UTC May 31,2019 10:19 AM UTC Blazor 1
loading
Tags: Scheduler
Matthew
Asked On May 28, 2019 12:30 PM UTC

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.




Karthigeyan Krishnamurthi [Syncfusion]
Replied On May 31, 2019 10:19 AM UTC

Hi Matthew, 
 
Sorry for the delay in getting back to you. 
 
Q1: Currently we have an issue in sending event argument changes to the component. Due to this issue, you cannot prevent the popup from opening. We have considered this as defect and already logged the feedback that can be tracked using the link below. It will be included in our upcoming release Volume2 2019, which is expected to roll out by June end, 2019.  Until then, we appreciate your patience. 
 
 
Q2: We have checked the reported case by removing the below highlighted EventTemplate property in version 17.1.49-beta and Schedule working fine at our end. Please find the below sample for the same.  
 
 
    <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>
 
 
 
Currently, we don’t have the template support for our blazor components. We have logged the feature request already in the following feedback location and scheduled to be included in our upcoming release Volume2 2019, which is expected to roll out by June end, 2019. 
 
Please let me know if you have any questions. 
 
Regards, 
Karthi 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon