App Inventor 2
Programming mobile phones with Android
by App Inventor 2 - Juan Antonio Villalpando
- Initiation Tutorial App Inventor 2 -
Return to tutorial index
____________________________
User interface
9.- DatePicker and TimePicker.
ip9_datetimepicker
Used to Set / Change the time and date.
In reality as its name suggests is a Selector date/time to choose a date/time, but it serves to change the time mobile for example.
_______________________
Design
- When you press Button TimePicker1 or DatePicker1, you get a calendar where you can change the time and date.
- In our case then show the time and date on a label.
- I used a simple procedure for the same Label the time and date shown. If you press repeatedly TimePicker1, it will show several hours.
_________________
Blocks
You can also set a time and date by calling TimePicker.SetTime and SelectDate.SetDate
____________________
Proposals
- Make a code where a date is selected, then another is selected and the number of days is calculated between those two dates.
- Make a code where you select a coming time, and when that time comes usually an alarm.
__________________________________
|