It is easier for users to input the time via a time picker where they are presented with scroll wheels. This has become a standard user interface object and is expected by users. This recipe shows you how to use a time picker in LiveCode.
To use a time picker, follow the given steps:
Add the following code to initiate a date picker, as displayed in the given screenshot:
on mouseUp mobilePickDate "time" end mouseUp
The output will be as follows:
When the user selects the time (hours, minutes, a.m./p.m.) and taps Done, you will want to ensure that you have a way to capture the time. LiveCode puts the user's selection into the
the result
system variable. You can test this by adding a line of code to themobilePickDate
command:on mouseUp mobilePickDate "time" answer the result end mouseUp
The output will be as follows: