How do you make a color code according the date? (or provide a WARNING notice based on elapsed time between dates)

Hi everyone. I am newbie here. I want to add a date warning for immunization apps. I mean if i input the date of immunization, there will be a color code whether the date is late according the schedule or not. I need the code block and design.


Programming Your App to Make Decisions will show how to do different things based on certain criteria.

Knowing what is in the tutorial will allow you to build

Try coding some Blocks and experiment. If you get into trouble, ask again with a specific question to help you build your app.

I already make the design in figma but idk how to apply that on this mit app

Great you have the Designer screen.

Here are some resources to help you learn to use the AI2 tools and start coding. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | Imagnity for more tutorials

Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU

You start here if you want to show your vaccination date in a calendar.

How to make a code color whether the vaccination they took is late? I mean if they late it will be a red color

You can determine which of two dates is in the past or future using the Clock component

May 2, 2023 is later than Mar 9, 2023 for example. You need to do something like that.

What have you coded so far.

See Clock

Hi guys, what are the blocks to make a warning, if we input the date of birth and the date of baby’s vaccination, there will be a sign if the baby’s vaccination is late

You can modify the above and it would work or you could substitute a Notification for changes to the Label background color.

You have to know how many days elapsed since DoB to the target (expected) vaccination date to solve this.

What have you tried?

i made a data input (in indonesia) and i use datepicker for DoB (tanggal lahir) and vaccination date (tanggal imunisasi).

and here is the blocks. my question is where to put your blocks in mine?

Sorry I do not know as I do not know how you intend your code to work. You can figure it out with this code snippet I hope. If you have questions, code something and post it and someone will give advice. :slight_smile:

and modify this code to provide a DatePicker instead of the three TextBoxes. There a many ways to code this, I chose to enter the DoB using TextBoxes and to schedule the time for the vaccination by scheduling in months post DOB.

I hope you find this useful.

could i message you? i am confused

I am glad to respond here in the community and answer your questions. There is no need to message me. Did you reproduce the Blocks in Button2, in the code above. Did you run the example?

  • DoB (tanggal lahir) is my Label6
  • vaccination date(tanggal imunisasi). is Label11 where the date is determined by how many months you enter into TextBox6 added to DoB. In the example I assume the first vaccination is due 6 months following DoB. A schedule could look like this from the CDC Birth-18 Years Immunization Schedule – Healthcare Providers | CDC.