DateTimePicker.DropHeight

Syntax

setDropHeight(value);

Parameters

value. Height of the area that houses drop-down panel.

Description

The DropHeight property sets height of the area that houses drop-down panel.

Example

To execute the example, connect the links to the PP.js library and to the PP.css visual styles table. On the HTML page place the DateTimePicker component and two numeric value editors implemented by the NumberEdit component. The width and the height of the DateTimePicker component's drop-down panel are set with the help of value editors.

<body>

Height:

<div id = "NE1"></div>

Width:

<div id = "NE2"></div>

<div id = "DTP1"></div>

</body>

<script type="text/javascript">

    var DTP = new PP.Ui.DateTimePicker({//Create the time and date editor.

       ParentNode: document.getElementById("DTP1")})

    var NE = new PP.Ui.NumberEdit({//Create the numeral editor.

       ParentNode: document.getElementById("NE1"),

       Width: 50})

    NE.AfterValueChange.add(function (sender, args)//Add the AfterValueChange event handler.

    {

       DTP.setDropHeight(NE.getValue());//Set the height that corresponds to the value of numeral editor for// the drop-down panel.

    })

    var NE2 = new PP.Ui.NumberEdit({//Create the numeral editor.

       ParentNode: document.getElementById("NE2"),

       Width: 50})

    NE2.AfterValueChange.add(function (sender, args)//Add the AfterValueChange event handler.

    {

       DTP.setDropWidth(NE2.getValue());Set the width that corresponds to the value of the numeral editor // for the drop-down panel.

    })

</script>

After executing the example the numeral editors with which help the sizes of the numeral editor drop-down part can be changed are located on the HTML page.

See also:

DateTimePicker