I would like to automatically show you how many days are left until the month ends.

Grateful for the help!

I would like to automatically show you how many days are left until the month ends.

Grateful for the help!

You could use a bit of Javascript to do this. Download the Toolbox plugin and drag the â€śExpressionâ€ť element onto the page. Inside of the property editor, you could input in the following code:

(I got the code from this Stack overflow post: Get number days in a specified month using JavaScript? - Stack Overflow )

That expression will return a number â€“ the total number of days in the month that you pass in (notice how Iâ€™m just extracting the current month and year in this example).

Once you have the number of days in the month, itâ€™s just a matter of taking that value and subtracting the current date:

When I preview the app, this is what I get:

Hope this helps!

- Jacob

Need a Bubble Developer? https://tekademy.co

2 Likes

Hi there, @claudiomarcio.silveiâ€¦ if you donâ€™t want to use a plugin and Javascript (no offense to Jacob, of course), here is another way to go about itâ€¦

Bestâ€¦

Mike

1 Like

Thank you very much is working, now without wanting to abuse, Iâ€™m trying to take the value of this input from the remaining days and divide it by the number of points that are missing, in the example account 55.55 / 16 = 3.4.

The way I did it gives me a higher score 3.7.

Is the way Iâ€™m doing this correct? Thank you one more time.

Thank you very much for the other alternative, but I think I already got it, just a few hits. Thank you very much anyway.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.