Your search did not match any results.


When you add a Calendar to an application, you need to specify its value in one of the following formats:

  • Date objects

  • The number of milliseconds since 00:00:00 on January 1, 1970

  • Strings that match the following patterns:

    • 'yyyy-MM-dd'
    • 'yyyy-MM-ddTHH:mm:ss'
    • 'yyyy-MM-ddTHH:mm:ssZ'
    • 'yyyy-MM-ddTHH:mm:ssx'

This demo shows how to use additional properties to customize your Calendar. You can toggle the checkboxes on the right to change the Calendar in real time.

Disable Dates

Use the min and max properties to specify the range of available dates. In this demo, these properties limit the range to three days before and after the current date. Enable the "Specified min value" and "Specified max value" checkboxes to apply the properties.

If you need to disable specific dates, use the disabledDates property. Toggle the "Disable weekend" checkbox to see how this setting affects the component's behavior. You can specify either an array of predefined dates or a function that determines whether a date is available.

Set the Beginning of the Week

To specify the first day of the week, pass its index (0 - for Sunday, 1 - for Monday, and so on) to the firstDayOfWeek property.

Handle Value Change

Set the onValueChanged property to handle the value change. In this demo, the DateBox and the Calendar both use this property to pass values between each other. You can use one of these components to change the date. See how it affects the other.

Customize Cell Appearance

Use the cellTemplate property to customize cell appearance. In this demo, when you toggle the "Use the Custom Cell Template" checkbox, all the weekends on the Calendar become blue, and all the holidays become red. You can set your own function that changes the class of the span element that contains cell text.

Other Customizations

Set the disabled property to disable the Calendar.

To specify the initial calendar view (month, year, decade, or century), set the zoomLevel property.

Thank you for your interest in our ASP.NET Core product libraries and UI component suite. We are moving ASP.NET Core-related demos and content to Please make sure to update your bookmarks with our new URL.

View Demo