Calendar/Date-picker template

4,481 views
Skip to first unread message

Scott Ferguson

unread,
Mar 6, 2015, 7:43:15 PM3/6/15
to app-inventor-de...@googlegroups.com


Changes log:

Ported to AI2 on 3/6/2015
see attached aia file.

This project demonstrates a simple calendar with a date-picker which can be added to a project.
It consists of two screens.

Screen1 opens the Calendar screen.
The user can use controls to navigate the calendar by months or can pick a specific month or year with listpickers.
A 'today' button shows the month containing the current day.
The user can touch a day button to select that date and a list is returned to Screen1 in the following format:

item 1: year (2012 - 2020)
item 2: month (1 - 12)
item 3: day number (1 - 31)
item 4: formatted text date

The second figure shows the blocks that return the date list.

The third figure shows how the date might be processed for display in Screen1.

If the Calendar screen is closed by pressing the hardware or soft back buttons, an empty list will be returned to Screen1.

You can extend the years covered easily or modify the date information returned to Screen1, if you wish.

Current version of the project is 2.0 which fixed a missing block on button #31.

calendar.zip
CalendarLibrary.aia

Malin J.X.

unread,
Jan 21, 2014, 9:56:26 PM1/21/14
to app-inventor-de...@googlegroups.com
Dear Scott, the link to download the calendar.zip file is not working.

Also, may I know what does the index with value 4 (in 3rd picture) mean?



Scott Ferguson

unread,
Jan 21, 2014, 11:53:59 PM1/21/14
to app-inventor-de...@googlegroups.com
Item 4 returns a formatted date.
I have refreshed the link to the zip project.
---
Scott

Malin J.X.

unread,
Jan 22, 2014, 10:12:20 PM1/22/14
to app-inventor-de...@googlegroups.com


Scott, it still doesnt work. I can view the zip file but can't download it. Stated as 'Not Found'/doesnt exist.

Malin J.X.

unread,
Jan 23, 2014, 12:56:02 AM1/23/14
to app-inventor-de...@googlegroups.com, Malin_...@hotmail.com
Hi scott, may I also know how do you get the calendar itself (Screen1)? From the phone's calendar or you used webviewer to open a website with a calendar??

Malin J.X.

unread,
Jan 23, 2014, 2:29:36 AM1/23/14
to app-inventor-de...@googlegroups.com, Malin_...@hotmail.com
Sorry, let me rephrase my last question. How do you get the calendar page/screen itself? And then display it like that on the app? From the phone's calendar or you used webviewer to open a website with a calendar??

Scott Ferguson

unread,
Jan 23, 2014, 9:05:37 PM1/23/14
to app-inventor-de...@googlegroups.com, Malin_...@hotmail.com
The Clock component provides the date and time and gets those values from the system clock internally.
The values are passed from the calendar screen in a list to the main calling screen using close screen with value and other screen closed.
Send me an email to scottfr...@gmail.com and i will attach the project zip file and return it to your email address.
I recall that some people have had trouble downloading attachments from Google groups but don't have a solution other than attaching to an email.
---
Scott

Malin J.X.

unread,
Jan 27, 2014, 9:09:33 PM1/27/14
to app-inventor-de...@googlegroups.com, Malin_...@hotmail.com
Thanks for the zip file, guess im one of those that can't download it from online! (:

Anyways, how can we store/tag data onto dates? my app has to:
-save a data each day. The data have to be stored into the date it was created. E.g. 1500kcal on 28/1/2014
-the data saved in the tag has to be linked to the date variable on the calendar, or is the date itself on the calendar, so that when the user select a date, it will show how much kcal the user have consumed on that day.

Sakis Hammer

unread,
Mar 9, 2016, 5:13:17 AM3/9/16
to App Inventor Developers Library
Great calendar .
I wonder if can I make it like work shift calendar
If someone clicks a day, to has the option to save in different colors the days in that calendar

1)morning
2)night
3)afternoon
4)dayoff
5)sick

With option to save repeat shift after 5 days

Scott Ferguson

unread,
Mar 9, 2016, 6:09:11 AM3/9/16
to App Inventor Developers Library
You could have the app test the text that was just entered for a day.
If morning was entered, make the button color color for that day red.
If night was entered, make the button color green, etc.
---

jukruz

unread,
Jun 4, 2017, 8:27:29 AM6/4/17
to App Inventor Developers Library
Saludos, buen trabajo, soy de españa, ¿para poner el lunes como primer dia de la semana?
Reply all
Reply to author
Forward
0 new messages