Date Picker

Date Pickers are a special kind of Control Input that lets the user select a specific date.

A Date Picker typically looks like this:

The following program illustrates the implementation of a Date Picker:

<td>@Html.TextBoxFor(mdl => mdl.Date, "{0:MM/dd/yyyy}", new { @class = "dPicker" })</td>

...

$(document).ready(function () {

    $(".dPicker").datepicker();

});

There is another type of Date Picker that additionally allows the user to select a specific time (hour and minute). It is called "Date Time Picker" and typically looks like this:

The following program illustrates the implementation of a Date Time Picker:

<td>@Html.TextBoxFor(mdl => mdl.Date, "{0:MM/dd/yyyy}", new { @class = "dPicker" })</td>

...

$(document).ready(function () {

    $(".dtPicker").datepicker();

});

Last updated