Search results

How To

The following section explains how to customize various aspects of DateTimePicker.

Disable the component

To disable the DateTimePicker, use its enable property to false.

The following example demonstrates the disabled component.

razor
@Html.EJS().DateTimePicker("datetimepicker").Enabled("false").Render()

Set the placeholder

The following example demonstrates how to set placeholder in the DateTimePicker component.

Using placeholder you can display a short hint in the input element.

razor
@Html.EJS().DateTimePicker("datetimepicker").Placeholder("Enter datetime").Render()