Multi Selection in Calendar Control

19 Dec 20221 minute to read

Calendar provides an option to select single or multiple dates by using isMultiSelection and values properties. By default, isMultiSelection property will be in disabled state.

API Type Description
isMultiSelection Boolean Enables the multi-selection option in the Calendar control
values Date[] Gets or sets the date range values in multi-selection option

The following example demonstrates the functionality of isMultiSelection property and values properties in the Calendar control.

@Html.EJS().Calendar("calendar").IsMultiSelection(true).Render()
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace EJ2CoreSampleBrowser.Controllers
{
    public class CalendarController : Controller
    {
        public ActionResult Multi()
        {
            return View();
        }
    }
}

NOTE

View Sample in GitHub.