DateTimeEdit.Mode

Syntax

Mode: PP.Ui.MonthCalendarMode;

Description

The Mode property sets the display mode of time and date.

Comments

The value of the property consists of elements of the MonthCalendarMode enumeration. Default value is 0.

Example

To execute the example, add links to the PP.js libraries and to the PP.css visual styles table. See below the Javascript code used to position the DateTimeEdit component is an HTML page:

<script type="text/javascript">

    DTE = new PP.Ui.DateTimeEdit({//Creates the DateTimeEdit component.

    ParentNode: document.getElementById("DTE1"),//Set ID that is contained in the// tag div.

    Width: 150,//The component width.

    MonthNames: [January, February, March, April, May, June, July, August, September, October, November, December],//The array of the month names.

    Mode: 1,//The display mode of time and date.

    TextAfterHalfYear: half year,//The text is after the half year value.

    TextAfterMonth: year,//The text is after the month value.

    TextAfterQuarter: quarter,//The text is after the quarter value.

    TextAfterWeek: week,//The text is after the week value.

    TextAfterYear: year})//The text is after the year value.

</script>

After executing the example the HTML page contains the DateTimeEdit component that looks as follows:

In the editor the week sequence number includes the set time and date because the one value is set for the Mode property.

Month and year are displayed when Mode: 2:

Quarter and year are displayed when Mode: 3:

Six months and year are displayed when Mode: 4:

Year is displayed when Mode: 5:

On selecting the value 0, day, month and year are displayed, as shown in the page Example of Creating the DateTimeEdit Component.

See also:

DateTimeEdit