The Calendar is a widget that displays a calendar and allows an end user to select the required date within a specified date range.

Included in:, dx.web.js, dx.viz-web.js, dx.all.js
Module: ui/calendar
Export: default
Calendar interactive configuration
Copy Code
Copy to Codepen

You can create the widget using one of the following approaches.

  • jQuery

    <div id="calendar"></div>
    $(function () {
            min: new Date(2000, 1, 1),
            max: new Date(2029, 12, 31),
            firstDayOfWeek: 1,
            value: new Date()
  • AngularJS

    <div ng-controller="DemoController">
        <div dx-calendar="{
            min: minDate,
            max: maxDate,
            firstDayOfWeek: 1,
            bindingOptions: {
                value: 'currentDate'
    angular.module('DemoApp', ['dx'])
        .controller("DemoController", function ($scope) {
            $scope.minDate = new Date(2000, 0, 1);
            $scope.maxDate = new Date(2029, 11, 31);
            $scope.currentDate = new Date();
  • Knockout

    <div data-bind="dxCalendar: {
        min: new Date(2000, 1, 1),
        max: new Date(2029, 12, 31),
        firstDayOfWeek: 1,
        value: currentDate
    var viewModel = {
        currentDate: ko.observable(new Date())
  • ASP.NET MVC Wrappers

        .Min(new DateTime(2000, 1, 1))
        .Max(new DateTime(2029, 12, 31))

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo Watch Video

See Also
Show Example:


An object defining configuration options for the Calendar widget.


This section describes members used to manipulate the widget.


This section describes events fired by this widget.

Default Cell Template

This section lists the fields that are used in a default template for calendar cells.

By default, a predefined cell template is applied to display calendar cells. This template is based on certain fields of an object holding cell information. Below is the list of these fields. If the default cell template is not appropriate for your task, implement a custom cell template based on these fields.

See Also