Default Calendar

This example demonstrates the Calendar control with default settings. The Bootstrap Calendar control allows an end-user to select dates and navigate through months and years.

SunMonTueWedThuFriSat
01 1234567
02 891011121314
03 15161718192021
04 22232425262728
05 2930311234
06 567891011
JanFebMarApr
MayJunJulAug
SepOctNovDec
<dx:BootstrapCalendar runat="server" SelectedDate="1.1.2017">
</dx:BootstrapCalendar>

Multi Select

In this example, the Calendar control allows you to select several dates. Click a date while pressing Ctrl to add an individual date to the selection. You can also use the Shift key to select a range of dates.

SunMonTueWedThuFriSat
40 293012345
41 6789101112
42 13141516171819
43 20212223242526
44 272829303112
45 3456789
JanFebMarApr
MayJunJulAug
SepOctNovDec
<dx:BootstrapCalendar runat="server" EnableMultiSelect="true">
</dx:BootstrapCalendar>

Multi-Month View

This example illustrates the multi-month view feature. The Calendar control below simultaneously displays multiple months, organizing them into several rows and columns.

  • Rows - specifies the number of rows
  • Columns - specifies the number of columns
  
JanFebMarApr
MayJunJulAug
SepOct  
  
    
    
  Nov 
    
    
   Dec
SunMonTueWedThuFriSat
01    1234
02 567891011
03 12131415161718
04 19202122232425
05 2627282930311
06 2345678
JanFebMarApr
MayJunJulAug
SepOctNovDec
<dx:BootstrapCalendar runat="server" Columns="2" Rows="2">
</dx:BootstrapCalendar>

Disabled Dates

In this example, some of the dates displayed by the Calendar control are disabled, so they appear grayed out and cannot be selected. The control provides two approaches to disabling dates.

SunMonTueWedThuFriSat
40 293012345
41 6789101112
42 13141516171819
43 20212223242526
44 272829303112
45 3456789
JanFebMarApr
MayJunJulAug
SepOctNovDec
<dx:BootstrapCalendar ID="CalendarDisabledDates" runat="server" OnCustomDisabledDate="Calendar_CustomDisabledDate">
    <ClientSideEvents CustomDisabledDate="onCustomDisabledDate" />
</dx:BootstrapCalendar>
protected void Page_Load(object sender, EventArgs e) {
    CalendarDisabledDates.DisabledDates.AddRange(GetDisabledDates());
}
public IEnumerable<DateTime> GetDisabledDates() {
    List<DateTime> disabledDates = new List<DateTime>();
    disabledDates.Add(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 7));
    disabledDates.Add(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 11));
    disabledDates.Add(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 13));
    disabledDates.Add(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 17));
    disabledDates.Add(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 19));
    return disabledDates;
}
protected void Calendar_CustomDisabledDate(object sender, CalendarCustomDisabledDateEventArgs e) {
    if(e.Date.DayOfWeek == DayOfWeek.Wednesday)
        e.IsDisabled = true;
}
function onCustomDisabledDate(s, e) {
    if(e.date.getDay() == 3)
        e.isDisabled = true;
}
Screen Size
Color Themes
Demo QR Code