Search
DateTimePickerMode Enumeration
See Also
 






Specifies the display mode of a DateTimePicker control.

Namespace: MindFusion.Common.UI
File: DropDown.js

 Syntax

JavaScript  Copy Code

// enum
DateTimePickerMode = {}

 Members

  Member name Value Description

Date

0

Indicates that the picker allows selection of dates.

DateTime

2

Indicates that the picker allows selection of dates and time.

Time

1

Indicates that the picker allows selection of time.

 Example

The following code creates a new DateTimePicker using an HTML div element with an id "date_picker". The dateTimePicker advances with one day and displays the date as "2/March". The interval between cells is 1 hour, the min time is 9 o'clock and the latest hour rendered is 19 o'clock. The dateTimePicker allows selection of hours:

JavaScript  Copy Code

var u = MindFusion.Common.UI;

var dateTimePicker = new ui.DateTimePicker(document.getElementById("date_picker"));
//advance for 1 day
dateTimePicker.advance(0, 0, 1);
dateTimePicker.autoComplete = true;
dateTimePicker.datePartSelect = true;
//1 hour in milliseconds
dateTimePicker.interval = 3600000;
//max time is 19 o'clock
dateTimePicker.maxTime = 64800000;
//min time is 9 o'clock
dateTimePicker.minTime = 32400000;
dateTimePicker.mode = u.DateTimePickerMode.Time;

 See Also