Fixing my customized calendar

Are you

  • building the images, or are you
  • selecting them from a pre-defined list of image picture files?

If you want to store one image picture per day, you could add an extra TinyDB NameSpace 'Images' with days (pick a unique format like yyyyMMdd(?)) for tags and image file names as values.

@Ela
Just an information only, while creating namespaces, you could have maintain a dictionary where key - namespace and value - namespace-description, so that, later on you can recall if you have multiple namespaces.

Since, there is no built-in block to recall all created namespcesa smting like getTags

...instead of the background color (as you did), I highlight the button with the data by inserting an image in background that I have already loaded (as you see in my blocks in the "Settings Day buttons" procedure).
But how can I indicate which days contain data, so which buttons have to be highlighted?

Is this the solution?

...I mentioned the Namespace but maybe it is enough to use "call> Get tags" block? ...if so, how?

Here is what needs to be changed:

  • Change the procedure 'procedure' to the name 'tags' and give it a parameter (date) to make it accept a date and return the tag list for that date
  • (never leave a procedure named procedure. Always name it for what it does or what it returns.)
  • change the test on the returned tag list to 'is list empty?' from your text empty test.
  • change the tags value procedure to use the date parameter instead of the global date.
  • have the tags procedure return the taglist directly
  • if you want to have a Sunday background image test for dates with no activity, hang it off the else branch as shown.

P.S. I used the wrong global date on my blocks markup.
You want to use the local variable that has the current date instant for this pass through the loop over the month's dates and buttons.

It seems that sooner or later I will have to dive into the new dictionary ocean :slightly_smiling_face: ...then I will need your explanations

Since we are in this zone, I ask for a detail:
My app is all in English / Sanskrit, but the month names in the DatePicker Button are in Italian.
I know it depends on the phone system, but is there any way to set the date language to English?

1 Like

I was sure it was that simple :slight_smile:
Simple solutions for maximum power! ...this is my specialty

So it works perfectly.

I decided to highlight the days with data by simply setting the button text to white, bold.
I will work on it a little more for optimal viewing, but now having the right procedure, it will be easy to make any changes.

Now I have to work on clicking on the highlighted day and making the data appear in the table.

1 Like

Sounds incredible but I did it.
The right data appears when I click on a day.


...can it be improved?

...and what about setting the month name to English?

That depends on your definition of improved.
If you're happy, I'm happy.

Look in the extended help of the Clock component for format codes for the FormatDate Time block.

If you are getting a month name in the wrong language, that is an individual preference of the phone owner, who I imagine knows how to read the language he set up in his phone settings.

...what would you do to improve it?

The app needs to fit both the app user and the app author.

Why come between them?

I found this:


...but how can I apply it in my FormatDate block?

...I found also this:

I tried:

Schermata 2022-08-17 alle 13.15.01
...but it doesn't work

How can I do?

Date and Time Patterns, this may help you in formating your date n time.

...looks like the same description as Abraham's link.
I didn't find there the answer to my question about how to set the month name in English.
Can you tell me what exactly should I write?

M	Month in year	Month	July; Jul; 07
Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.

Month Names

Is THIS what you wanted?

...my month name is in Italian like my phone system. I need to force it to English.
How can I do?

agosto ->> August, is it?

1 Like

I wanted to try this solution, but after adding the Translator, when the Screen starts it doesn't recognize the first page "Home" to show (and also any other page I tried to set).

Schermata 2022-08-17 alle 16.24.59

When I delete the Translator, my app works fine.
So I can't see if it works.
What happen?

...anyway, what I need is that not only Italian, but any other language of the user (it can come from any country) be forced into English.

make sure you are using the current Companion.

Also, only supply 'en' to the translator:

Read the tool tip for the translator block.

Yes, I think it's the Companion problem, but unfortunately I can't install the current Companion on my old iOS (El Capitan) which I can't update for various reasons.

Is there an alternative?