Search results

Skip a Month in the Calendar in ASP.NET Core Calendar control

22 Oct 2021 / 1 minute to read

The following example demonstrates how to skip a month in the Calendar while clicking the previous and next icons. In the example below, the navigated event is used to skip a month with navigateTo  method.

Copied to clipboard
<ejs-calendar id="calendar" navigated="onNavigate"></ejs-calendar>

    function onNavigate(args) {
        var date;

        if ((args.event.currentTarget).classList.contains("e-next")) {
            date = new Date( + 1));
        if ((args.event.currentTarget).classList.contains('e-prev')) {
            date = new Date( - 1));
        if (args.view == 'Month') {debugger
            calendarObject = document.getElementById('calendar').ej2_instances[0];
            calendarObject.navigateTo('Month', date);