ronnie
November 4, 2021, 6:41pm
21
@muneer thanks for sharing that! I was racking my brain because my alert(message) portion of JavaScript was popping up the correct message, but the label kept coming back as undefined.
muneer
November 4, 2021, 6:54pm
22
All I needed to do was to add .toUTCString to the date variable.
ThunkableWebviewerExtension.postMessage(myDate.toUTCString());
I have updated the example I posted sometime ago so if someone uses it, gets the correct result.
I made a simple JavaScript code to get the date after certain number of days.
[image]
This is giving today’s date but if I add some days I get the future date in the label.
[image]
All managed by a web viewer extension running .html file added to the project as an asset…
The Google sheet solution is still a viable solution and it works just as good.
This is the blocks of the project
[image]
This is the JavaScript Code
<!DOCTYPE html>
<html>
<head>
<script src="https://thunkable.github.…