customize action

I am working with the schedular component in ASP.NET and I am trying to customize the action when a user clicks on an event in the schedular. currently it opens the popup view but I would rather want it to trigger a javascript function instead


1 Reply

SR Swathi Ravi Syncfusion Team December 6, 2024 11:10 AM UTC

Hi Don Hizzo,

 

Thank you for reaching out.

 

You can prevent the default popup from opening when clicking on an event and instead call your JavaScript function by using the Scheduler's EventClick event.

 

@using Syncfusion.EJ2.Schedule

 

@(Html.EJS().Schedule("schedule")

    .Height("550px")

    .EventClick("OnEventClick")

    .SelectedDate(new DateTime(2018, 2, 15))

    .Render()

)

 

<script>

    function OnEventClick(args) {

        args.cancel = true; // prevent the default popup opening

 

        //You can trigger your javascript function here

        alert("You can trigger your javascript function here")

    }

</script>

 

 

Regards,

Swathi


Loader.
Up arrow icon