To make calendar

I don’t have chance to check / understand your code. Just test it an find this problem.

I was looking for a long time for a native calendar component, it was something really missing in thunkable.

Lets keep working on that, when I have more time I will try to help, despite I’m a beginner in Thunkable… :slight_smile:

Or maybe some expert colleague help us…

Anyway, maybe you will need to change the approach, and “pre-load” the values…

I just thought I’d chime in here. Cause i love calendars :slight_smile:

a webapp version

Can you guys check this link out and test it on your phone.

Project Link
This is working on my iPhone, I’ve included a screenshot below. I’d love to know if it’s not working on your device and if so, what device and operating system are you running?

jared, can you use this link instead - for both webapp and project version? i had just fixed the calendar so it displays the last week properly - the earlier version was “floating” the last few days of the last week into the center so the days are not lined up.

the incorrect_last_week error was reported by @paulovaz72 which i fixed in the above version. the other, more important error is that he couldn’t get it to display properly on his device. i also get the same behavior on my device - an android galaxy. i’ve tried changing the wait time in the clone blocks to longer values but they never fixed the display on live test on the device.


@jared , I tested in two devices: Galaxy S9 and Asus MemoPad (both androids, but different versions) and the behavior was the same wrong display of calendar.

@manyone, did you consider the possibility to store the calendar in a external table to improve the delay time (maybe you can generate an online google spreadsheet, or airtable, or Firebase Database (my personal choice), and just load & display later?

I think if you save data for the next 100 years, will more than sufficient to use in our projects, in this case you just load the data and display in the nice design you create, instead do calculations each time you change the month or year. I mean, you do the calculation but just one time. (Just put a “SAVE CALENDAR” button in your project, and store the data). After you can create another routine just to load & display using internal lists…

I think you can solve 2 problems with one change!

1 Like

I tested the latest version of @manyone and found out that the Screen Opens block is not executed from the mobile.

I changed the Opens to Starts and it worked for me.

Can you please test and confirm if you have the same behavior?

Yes @muneer !!! I changed and works too.

I see this behavior in the 1st screen of the APP I’m developing…

I put some code in the “when open” block, and nothing happens… So I changed to “when starts” and works fine.

Interesting, this happens only on the 1st APP screen… because in all the others, works well…

Why? Have no idea :slight_smile: Maybe because the APP is already OPEN when instantiate the 1st Screen?

1 Like

I don’t have a logical answer but it works.

it worked! you’re a genius muneer!
it doesn’t speak well of thunkable though - i learned early on that screen_starts is executed at the very beginning, while screen_opens is executed after that whenever we navigate to the screen. now i have to unlearn that but only in certain cases - there is no consistency.
thanks for the suggestion!

1 Like

Actually, the absence of consistency goes beyond the Starts and Opens blocks. Why it works in the computer but doesn’t work in a phone??? This is another inconsistency.

1 Like

Thunk-ing, i found myself in condition to execute some code only once after the app starts, on a particular screen, and some other action to be done as many times as a user switch between screens.
So if a screen is in that condition (have code that needs to be executed only once, and other code that needs to be executed as many times as that screen is accessed , i use both when screen starts - where i put code that needs to be executed only once, as soon as user access that screen, and when screen opens where i put code that needs to be executed as many times as user accesses that screen.
I found that both are launched same time, so error may occurs.
So i use a validation variable, to put some order in execution:
Let`s say validate=FALSE at the very beginning of the entire application.
Where that particular screen is accessed, on when screen starts i put validate=TRUE only after the entire code from that block is executed.
And i put at the very beginning of when screen opens something like:
While validate=FALSE
wait 0.001

This way i know for sure when, and what actions are done. :thinking:


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.