lcdui.date — Date/Time widget for lcdui forms
lcdui.date
[
-date
date/time in seconds
]
[
-label
label
]
[
-type
date
| date_time
| time
]
[cget
$datecmd
-optname
]
[configure
-optname
optval
]
Note | |
---|---|
Date fields also utilize the common "item" options, described here: lcdui item options |
The lcdui.date command creates a widget that can either display, or allow the user to enter a date, a time, or both. For an in-depth look at the Java code that this command is based on, see: javax.microedition.lcdui.DateField
The lcdui.date command takes these options:
-label
: A label for the date widget.
-type
: One of
date
, which only displays a date
selection widget, time
, which only
displays a time selection widget, or
date_time
, which allows the user to
select both a date and a time.
-date
: The current time,
expressed in milliseconds.
set date [lcdui.date -label "Current date and time:" \ -date [clock time] -type date_time] set form [lcdui.form -title "Date Form"] $form append $date $form setcurrent
Live example: http://www.heclbuilder.com/scripts/show/144