GettingStarted

11 Jan 20171 minute to read

This section briefly describes about how to create a DateTimepicker in your application with JSP.

Create a simple DateTimepicker in JSP

You can create an JSP application and add necessary scripts with the help of the given JSP Getting Started Documentation.

Create the JSP file and add the below given code to render DateTimepicker control.

  • javascript
  • <div >
         <div class="control" margin="auto" align="center">
           <ej:dateTimePicker id="datetimepicker"  width="50%"></ej:dateTimePicker>
         </div>
    </div>

    You can execute the above code example to display the DateTimepicker control.

    Configuring DateTimepicker

    This section encompasses the details on how can you configure the DateTimepicker control in your application and customize it with various properties for DateTimepicker according to your requirement.

    To modify the mindatetime and maxdatetime, add the following code in your JSP file.

  • javascript
  • <ej:dateTimePicker id="datetimepicker" minDateTime="12/01/2016 09:00 AM"  maxDateTime="12/30/2016 09:00 PM" width=30%></ej:dateTimePicker>

    The following screenshot illustrates the DateTimepicker control with preset type property.