Default DateEdit

This example demonstrates the Bootstrap Date Edit control with default settings. The Bootstrap Date Edit control is a date editor control that combines the functionality of a single-line text editor, button editor, and drop-down calendar.

<dx:BootstrapDateEdit runat="server" Date="1.1.2017">

Time Section

The Date Edit control allows you to edit date-time values using a time section of drop-down window or directly within an edit box. The time section settings can be accessed through the TimeSectionProperties property:

The EditFormat property allows you to specify whether the edit box should display a date, time, or both.

<dx:BootstrapDateEdit runat="server" Date="1.1.2017 8:00" EditFormat="DateTime">
    <TimeSectionProperties Visible="true" />

Multi-Month View

This example illustrates the multi-month view feature. The drop-down calendar of the Date Edit control below simultaneously displays multiple months, organizing them into several rows and columns.

<dx:BootstrapDateEdit runat="server">
    <CalendarProperties Columns="2"></CalendarProperties>

Disabled Dates

In this example, some of the dates displayed by the Date Edit control's drop-down calendar are disabled, so they appear grayed out and cannot be selected. The control provides two approaches to disabling dates.

If a disabled date is typed into the input element, it is considered invalid and is handled by the editor in a way specified by the DateOnError property.

<dx:BootstrapDateEdit ID="DateEditDisabledDates" runat="server" OnCalendarCustomDisabledDate="DateEdit_CustomDisabledDate" DateOnError="Null">
    <ClientSideEvents CalendarCustomDisabledDate="onCustomDisabledDate" />
protected void Page_Load(object sender, EventArgs e) {
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 DateEdit_CustomDisabledDate(object sender, CalendarCustomDisabledDateEventArgs e) {
    if(e.Date.DayOfWeek == DayOfWeek.Wednesday)
        e.IsDisabled = true;
function onCustomDisabledDate(s, e) {
    if( == 3)
        e.isDisabled = true;

Null Text

This example illustrates how the NullText property can be used to display prompt text (watermark) in the editor's edit box. Specified text is displayed when the value of the editor is null and the editor is not focused. The prompt text disappears when the editor receives focus. To show the null text even in the focused editor set the NullTextDisplayMode property to UnfocusedAndFocused.

<dx:BootstrapDateEdit runat="server" NullText="Enter Your Birth Date">


In this example, the Date Edit control takes advantage of the masked input feature to only accept values in a specific date format. To enable masked input within a date editor, the UseMaskBehavior property should be set to true.

The mask is specified using the EditFormatString property when the EditFormat property is set to Custom.

<dx:BootstrapDateEdit runat="server" Date="1.1.2017" EditFormat="Custom" EditFormatString="MMMM dd, yyyy" UseMaskBehavior="true">

Display Format

The DisplayFormatString property specifies the pattern used to format the value of an editor for display purposes when the editor is not focused. Display values can be formatted using the standard formatting mechanism described in MSDN. For more information about composing format patterns, see the following MSDN topics: Numeric Format Strings and Date and Time Format Strings.

<dx:BootstrapDateEdit runat="server" Date="1.1.2017" DisplayFormatString="D">

Caption and HelpText

In this example, the Date Edit control displays a caption on the top and auxiliary help text at the bottom of the editor.

<dx:BootstrapDateEdit runat="server" Caption="Birthday" HelpText="Enter your birthday">
    <ValidationSettings RequiredField-IsRequired="true"></ValidationSettings>
Screen Size
Color Themes
Demo QR Code