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. Image for the cookie policy date
close icon

How to stop new quick info dialog opening when clicking away from existing quick info dialog?

If I have a an existing event that I single click on, the event is shown in the quick info dialog box.

If I click the X close button it closes.

If I click away from the dialog, clicking on the underlying calendar view, it closes but a new event dialog opens.

How do I stop the new event dialog opening if I am closing a visible quick info dialog by clicking away from it?


1 Reply

SR Swathi Ravi Syncfusion Team April 5, 2023 08:59 AM UTC

Hi Aaron,


You can achieve your requirement by using the Schedule’s PopupClose, PopupOpen, CellClick and EventClick events, as shown in the below snippet.


Api: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_OnEventClick

                https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_OnCellClick

                https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_OnPopupClose

                https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Schedule.ScheduleEvents-1.html#Syncfusion_Blazor_Schedule_ScheduleEvents_1_OnPopupOpen


[index.razor]

<SfSchedule>

    <ScheduleEvents TValue="AppointmentData" OnPopupOpen="onPopupOpen" OnPopupClose="onPopupClose" OnCellClick="onCellClick"          OnEventClick="OnEventClick"></ScheduleEvents>

</SfSchedule>

 

@code {

    bool isPopupOpen = false;

    public void onPopupOpen(PopupOpenEventArgs<AppointmentData> args)

    {

        isPopupOpen = true;

    }

 

    public void onPopupClose(PopupCloseEventArgs<AppointmentData> args)

    {

        isPopupOpen = false;

    }

 

    public void onCellClick(CellClickEventArgs args)

    {

        if(isPopupOpen)

        {

            args.Cancel = true;

        }

    }

 

    public void OnEventClick(EventClickArgs<AppointmentData> args)

    {

        if (isPopupOpen)

        {

            args.Cancel = true;

        }

    }

}


Regards,

Swathi Ravi


Attachment: blazorschedulerpreventnewquickinfoopening_85246981.zip

Loader.
Live Chat Icon For mobile
Up arrow icon