time.comp

The Time widget is used for setting the time.
The time must be specified in HH:MM format.

If the time is specified as
value => 01:02:33
the widget will display 01:02. But when the value is again read it will return 01:02:33.
This behavior is implemented to prevent the modifications of the database without user's consent.

Input Parameters:

Parameters

Parameter Name Description Default Value
id Select ID. Undefined.
description Tooltip. Empty string.
value change read/write Empty string.
readonly can't change state if in readonly mode Undefined.
h24_format If 0 will be possible to insert more than 24 hours 1
numeric_value if 1 the format will be digital with unit of measure in hours and decimals of hour, rather than in the format HH: MM 0
NumCifre number of total digits. 5

Examples

Demo

TimeExample.png

The demo demonstration is available here.

ReadOnly

here set "readonly => 1" to change state in read-only mode
<h2>ReadOnly example</h2>
<& /input/time.comp, 
        id => 'test_time_r',
        value => '12:00',
        readonly => 1,
        onchange => 'alert("New time Data:"+this.get_value());',
        description => 'Test ReadOnly Descrizione time',
&>
<br>

Write

here set "readonly => 0" to change state in write mode (or do not use the parameter)

<h2>Write example</h2>
<& /input/time.comp, 
        id => 'test_time',
        value => '01:05',
        readonly => 0,
        onchange => 'alert("New time Data:"+this.get_value());',
        description => 'Test Write Set Time Example',
&>

numeric_value

<h2>numeric_value example</h2>
<& /input/time.comp, 
        id => 'test_num_value_time',
        value => '1.25',
        readonly => 0,
        numeric_value => 1,
        onchange => 'alert("New time Data:"+this.get_value());',
        description => 'Test numeric_value time',
&>

h24_format

<h2>h24_format example</h2>
<& /input/time.comp, 
        id => 'test_h24_format_time',
        value => '56:00',
        readonly => 0,
	h24_format => 1,
	NumCifre => 7,
        onchange => 'alert("New time Data:"+this.get_value());',
        description => 'Test h24_format time',
&>
Topic revision: r6 - 21 Sep 2016, GuidoBrugnara
This site is powered by FoswikiCopyright (©) Leader.IT - Italy P.I. IT01434390223 Privacy policy & use of cookies