Event Log:

jQuery Scheduler: Events

jqxScheduler Events example.

A live JavaScript/jQuery example of jqxScheduler, the jQWidgets Scheduler component, with its complete source code below. It is one of 45 jqxScheduler demos for jQuery.

jqxScheduler API used in this demo

Source code

To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $. Getting started with jqxScheduler shows the setup step by step.

The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxbuttons.js, jqxscrollbar.js, jqxdata.js, jqxdate.js, jqxscheduler.js, jqxscheduler.api.js, jqxdatetimeinput.js, jqxmenu.js, jqxcalendar.js, jqxtooltip.js, jqxwindow.js, jqxcheckbox.js, jqxlistbox.js, jqxdropdownlist.js, jqxnumberinput.js, jqxradiobutton.js, jqxinput.js.

It also loads helper scripts of this demo site, which are not part of the library: demos.js (getWidth() and other layout helpers).

script.js

$(document).ready(function () {

    // prepare the data
    var source =
    {
        dataType: 'json',
        dataFields: [
            { name: 'id', type: 'string' },
            { name: 'status', type: 'string' },
            { name: 'about', type: 'string' },
            { name: 'address', type: 'string' },
            { name: 'company', type: 'string'},
            { name: 'name', type: 'string' },
            { name: 'style', type: 'string' },
            { name: 'calendar', type: 'string' },
            { name: 'start', type: 'date', format: "yyyy-MM-dd HH:mm" },
            { name: 'end', type: 'date', format: "yyyy-MM-dd HH:mm" }
        ],
        id: 'id',
        url: '../sampledata/appointments.txt'
    };
    var adapter = new $.jqx.dataAdapter(source);
    $("#scheduler").jqxScheduler({
        date: new $.jqx.date(2026, 11, 19),
        width: getWidth("Scheduler"),
        height: 600,
        rowsHeight: 40,
        source: adapter,
        ready: function () {
            // gets scrollbable height.
            var scrollHeight = $("#scheduler").jqxScheduler('scrollHeight');
            // scroll 700px.
            $("#scheduler").jqxScheduler('scrollTop', 700);
        },
        appointmentDataFields:
        {
            from: "start",
            to: "end",
            id: "id",
            description: "about",
            location: "address",
            subject: "name",
            style: "style",
            status: "status"
        },
        view: 'weekView',
        views:
        [
            "dayView",
            "weekView"
        ]
    });

    $("#scheduler").on('appointmentDelete', function (event) {
        var args = event.args;
        var appointment = args.appointment;
        $("#log").html("appointmentDelete is raised");
    });

    $("#scheduler").on('appointmentAdd', function (event) {
        var args = event.args;
        var appointment = args.appointment;
        $("#log").html("appointmentAdd is raised");
    });

    $("#scheduler").on('appointmentDoubleClick', function (event) {
        var args = event.args;
        var appointment = args.appointment;
        // appointment fields
        // originalData - the bound data.
        // from - jqxDate object which returns when appointment starts.
        // to - jqxDate objet which returns when appointment ends.
        // status - String which returns the appointment's status("busy", "tentative", "outOfOffice", "free", "").
        // resourceId - String which returns the appointment's resouzeId
        // hidden - Boolean which returns whether the appointment is visible.
        // allDay - Boolean which returns whether the appointment is allDay Appointment.
        // resiable - Boolean which returns whether the appointment is resiable Appointment.
        // draggable - Boolean which returns whether the appointment is resiable Appointment.
        // id - String or Number which returns the appointment's ID.
        // subject - String which returns the appointment's subject.
        // location - String which returns the appointment's location.
        // description - String which returns the appointment's description.
        // tooltip - String which returns the appointment's tooltip.

        $("#log").html("appointmentDoubleClick is raised");
    });

    $("#scheduler").on('cellClick', function (event) {
        var args = event.args;
        var cell = args.cell;
       
        $("#log").html("cellClick is raised");
    });

    $("#scheduler").on('appointmentChange', function (event) {
        var args = event.args;
        var appointment = args.appointment;
        // appointment fields
        // originalData - the bound data.
        // from - jqxDate object which returns when appointment starts.
        // to - jqxDate objet which returns when appointment ends.
        // status - String which returns the appointment's status("busy", "tentative", "outOfOffice", "free", "").
        // resourceId - String which returns the appointment's resouzeId
        // hidden - Boolean which returns whether the appointment is visible.
        // allDay - Boolean which returns whether the appointment is allDay Appointment.
        // resiable - Boolean which returns whether the appointment is resiable Appointment.
        // draggable - Boolean which returns whether the appointment is resiable Appointment.
        // id - String or Number which returns the appointment's ID.
        // subject - String which returns the appointment's subject.
        // location - String which returns the appointment's location.
        // description - String which returns the appointment's description.
        // tooltip - String which returns the appointment's tooltip.

        $("#log").html("appointmentChange is raised");
    });
});

body.html

<div id="scheduler"></div>
<br>
Event Log:
<div id="log">

</div>

Learn more

More jQuery Scheduler demos