# To make calendar

**URL:** <https://community.thunkable.com/t/to-make-calendar/1639040>\
**Category:** Questions about Thunkable X\
**Created:** [November 29, 2021, 3:43pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040 "2021-11-29T15:43:56Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)\
**Post date:** [December 7, 2021, 8:58pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/21 "2021-12-07T20:58:11Z")

</div>

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… 🙂

Or maybe some expert colleague help us…

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 7, 2021, 10:20pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/23 "2021-12-07T22:20:56Z")

</div>

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

[a webapp version](https://thunkable.site/web-build/index.html?webAppId=XeWQOCU8s)

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

[Project Link](https://x.thunkable.com/projectPage/61afddb0cf2837034489fcef)  
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?

 ![IMG_5948.PNG](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/3/4337bd04943d54065a1bf5fb47247c72a6bae6ff.jpeg)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [December 8, 2021, 12:49am UTC](https://community.thunkable.com/t/to-make-calendar/1639040/24 "2021-12-08T00:49:11Z")

</div>

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.

[https://x.thunkable.com/copy/cadb905afb828a454afe32db93f047ed](https://x.thunkable.com/copy/cadb905afb828a454afe32db93f047ed)

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.

---

<div class="post-metadata">

**Author:** ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)\
**Post date:** [December 8, 2021, 12:32pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/25 "2021-12-08T12:32:00Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 8, 2021, 3:35pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/26 "2021-12-08T15:35:51Z")

</div>

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.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d23bd1298f0efabd25fa9e67b9c2f613519f95e7.png)

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

---

<div class="post-metadata">

**Author:** ![paulovaz72](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/paulovaz72/32/119071_2.png) [@paulovaz72](https://community.thunkable.com/u/paulovaz72)\
**Post date:** [December 8, 2021, 3:54pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/27 "2021-12-08T15:54:36Z")

</div>

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 🙂 Maybe because the APP is already OPEN when instantiate the 1st Screen?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 8, 2021, 4:00pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/28 "2021-12-08T16:00:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [December 8, 2021, 9:17pm UTC](https://community.thunkable.com/t/to-make-calendar/1639040/29 "2021-12-08T21:17:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 9, 2021, 5:16am UTC](https://community.thunkable.com/t/to-make-calendar/1639040/30 "2021-12-09T05:16:28Z")

</div>

> [@manyone](#):
>
> there is no consistency.

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.

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [December 9, 2021, 9:06am UTC](https://community.thunkable.com/t/to-make-calendar/1639040/31 "2021-12-09T09:06:13Z")

</div>

> [@manyone](#):
>
> 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.

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. 🤔

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [March 9, 2022, 9:07am UTC](https://community.thunkable.com/t/to-make-calendar/1639040/32 "2022-03-09T09:07:05Z")

</div>

Closed on March 9, 2022, 9:07am UTC

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

[Previous page](https://community.thunkable.com/t/to-make-calendar/1639040.md?page=1)
