# Custom countdown

**URL:** <https://community.glideapps.com/t/custom-countdown/38574>\
**Category:** Ask for Help\
**Tags:** custom-code\
**Created:** [February 16, 2022, 1:10pm UTC](https://community.glideapps.com/t/custom-countdown/38574 "2022-02-16T13:10:31Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 7, 2022, 11:02pm UTC](https://community.glideapps.com/t/custom-countdown/38574/41 "2022-11-07T23:02:54Z")

</div>

> [@Alexander\_Rubino](#):
>
> I have made a couple of adjustments (removing the days and hour function + setting the date to the selected date instead of now)

Which original prototype are you referring to here? Where did you make your adjustments?

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 8, 2022, 9:26am UTC](https://community.glideapps.com/t/custom-countdown/38574/42 "2022-11-08T09:26:34Z")

</div>

I only want to remove the hour and days feature.  
And also change the font.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 8, 2022, 2:03pm UTC](https://community.glideapps.com/t/custom-countdown/38574/43 "2022-11-08T14:03:23Z")

</div>

You can fork the original link and then make changes in the JS function (specifically in the style part, which is CSS).

> **[GitHub - thinhdinhlca/custom-countdown](https://github.com/thinhdinhlca/custom-countdown)**
>
> Contribute to thinhdinhlca/custom-countdown development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 9, 2022, 8:35am UTC](https://community.glideapps.com/t/custom-countdown/38574/44 "2022-11-09T08:35:31Z")

</div>

Maybe I’m just stupid, but when I press run nothing happens, and I can’t seem to see the code. The primary code is not visible, or at least I don’t know where to find it.

 ![Screenshot 2022-11-09 at 09.34.03](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/3/c35e41edad594f207d458b41c9192a4aff261ed5.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 10, 2022, 12:24am UTC](https://community.glideapps.com/t/custom-countdown/38574/45 "2022-11-10T00:24:48Z")

</div>

Have you tried putting your Replit’s link to the Experimental Code column in Glide?

And is there a reason you don’t want to deploy in Github?

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 12:49pm UTC](https://community.glideapps.com/t/custom-countdown/38574/46 "2022-11-10T12:49:02Z")

</div>

If I put the link into glide this shows. But where is all the code that should control the timer? The hour function and all of that, right now it shows almost nothing in the Javascript section (look at the image of the previous post).  
Am I doing something wrong?

 ![Screenshot 2022-11-10 at 13.47.04](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/6/96c6ec08ae4103d509e7e0898a9a0233789018ac.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 10, 2022, 12:58pm UTC](https://community.glideapps.com/t/custom-countdown/38574/47 "2022-11-10T12:58:41Z")

</div>

That code column you are using performs a substring function. It has nothing to do with a countdown timer.

The code you need is the one that @ThinhDinh gave you earlier…

> [@ThinhDinh](#):
>
> You can fork the original link and then make changes in the JS function (specifically in the style part, which is CSS).
> 
> [GitHub - thinhdinhlca/custom-countdown](https://github.com/thinhdinhlca/custom-countdown)

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 1:14pm UTC](https://community.glideapps.com/t/custom-countdown/38574/48 "2022-11-10T13:14:18Z")

</div>

Maybe I’m not clear enough.  
I pressed that link to github.  
I forked the replit link, and didn’t change anything. But nothing happens.  
Try to go into the github and click on the “this Replit” link.  
The code doesn’t work

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 10, 2022, 1:31pm UTC](https://community.glideapps.com/t/custom-countdown/38574/49 "2022-11-10T13:31:06Z")

</div>

Yeah, I’m not sure what you did. All I can say is that the code that’s shown in your earlier screen shot isn’t the code that you need.

I don’t know enough about replit to help you troubleshoot that, so my recommendation would be to use GitHub (as per Thinh’s earlier suggestion).

If you’re new to using GitHub with Glide code columns, here’s a short tutorial:

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 6:45pm UTC](https://community.glideapps.com/t/custom-countdown/38574/50 "2022-11-10T18:45:26Z")

</div>

This works, thank you. But it seems to break when I use a custom date from glide. I’m getting the current date and setting the timer to 3 minutes longer. But this seems to break because it says NaNm NaNs. But if I copy the date, and put it in manually, it works. Why is that?

![Screenshot 2022-11-10 at 19.43.04](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/1/c1d43a3a53053f3d253e4c3c5472873fd563298e.png)

 ![Screenshot 2022-11-10 at 19.44.42](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/a/aa97bf003aa8ea9ba18fc1498ef98c61376db63e.png)

![Screenshot 2022-11-10 at 19.42.20](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/e/2ebdc4dd1a79600c84aef699f8b3fa8fe68b879f.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [November 10, 2022, 6:53pm UTC](https://community.glideapps.com/t/custom-countdown/38574/51 "2022-11-10T18:53:48Z")

</div>

what exactly are you trying to do? i don’t think you need scripts for that

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 6:56pm UTC](https://community.glideapps.com/t/custom-countdown/38574/52 "2022-11-10T18:56:45Z")

</div>

I want to start a timer when a button is clicked. This button sets the current date in a column, I then want to use math to make a date 3 minutes into the future. I then want to make a countdown to this time (3 minutes). But when I implement this math Date into the code, it says “NaNm NaNs”.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [November 10, 2022, 6:59pm UTC](https://community.glideapps.com/t/custom-countdown/38574/53 "2022-11-10T18:59:15Z")

</div>

you can use just the math column for that… why script?

here is the count down… enter the seconds

> **[Delay Action - DEMO](https://delay-action-demo.glideapp.io/dl/d0a5f4)**
>
> delay actions by blocking screen for a specific time

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 7:02pm UTC](https://community.glideapps.com/t/custom-countdown/38574/54 "2022-11-10T19:02:28Z")

</div>

I want to have the countdown in a text-format, not a clock like you have done.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [November 10, 2022, 7:02pm UTC](https://community.glideapps.com/t/custom-countdown/38574/55 "2022-11-10T19:02:50Z")

</div>

😉 even easier!  
use the math column…  
if you don’t need to display seconds… just do time now - time clicked, and show with the text component.  
Glide will sync every 5-10 seconds

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 7:07pm UTC](https://community.glideapps.com/t/custom-countdown/38574/56 "2022-11-10T19:07:59Z")

</div>

Yea 5-10 seconds is not good enough, I need an actual countdown every second

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [November 10, 2022, 7:09pm UTC](https://community.glideapps.com/t/custom-countdown/38574/57 "2022-11-10T19:09:11Z")

</div>

for the 3 minutes countdown, do you need precision up to 1 sec?

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 7:10pm UTC](https://community.glideapps.com/t/custom-countdown/38574/58 "2022-11-10T19:10:24Z")

</div>

Yes I want to achieve the best result for my users

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [November 10, 2022, 7:11pm UTC](https://community.glideapps.com/t/custom-countdown/38574/59 "2022-11-10T19:11:06Z")

</div>

so you need CSS clock like in my sample

---

<div class="post-metadata">

**Author:** ![Alexander\_Rubino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexander_rubino/32/48638_2.png) [@Alexander\_Rubino](https://community.glideapps.com/u/Alexander_Rubino)\
**Post date:** [November 10, 2022, 7:11pm UTC](https://community.glideapps.com/t/custom-countdown/38574/60 "2022-11-10T19:11:56Z")

</div>

No, I would rather use the Github Code that @ThinhDinh created.

[Previous page](https://community.glideapps.com/t/custom-countdown/38574.md?page=2)

[Next page](https://community.glideapps.com/t/custom-countdown/38574.md?page=4)
