# Date Pickers

**URL:** <https://community.glideapps.com/t/date-pickers/73428>\
**Category:** Ask for Help\
**Created:** [May 16, 2024, 11:50am UTC](https://community.glideapps.com/t/date-pickers/73428 "2024-05-16T11:50:21Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 2:43pm UTC](https://community.glideapps.com/t/date-pickers/73428/21 "2024-05-20T14:43:42Z")

</div>

Darren, I really appreciate you putting this together for me.  
I will examine and try to understand what’s going on. I have downloaded the template.  
One observation I do have at the moment is that when I put start / end times in, they seem to disspear and write to the table even if I haven’t pressed submit.

---

<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:** [May 20, 2024, 2:53pm UTC](https://community.glideapps.com/t/date-pickers/73428/22 "2024-05-20T14:53:46Z")

</div>

That’s the way a custom form works - values are written to user specific columns first, and then used to add a row when the form is submitted.

However, the disappearing thing shouldn’t be happening. Like I’ve mentioned a couple of times, the solution I offered assumes that the form will always be submitted by a signed in user, so it’s essential that you do the following:

- make sure User Profiles are correctly configured
- have at least one row in the Users table
- be “viewing as” that user when interacting with the form

If you haven’t done the above, it won’t work properly.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 2:56pm UTC](https://community.glideapps.com/t/date-pickers/73428/23 "2024-05-20T14:56:40Z")

</div>

I am vieweing the form as a signed in user. You had already created a user in the table. I am viewieng as that user (i.e. you).

---

<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:** [May 20, 2024, 3:19pm UTC](https://community.glideapps.com/t/date-pickers/73428/24 "2024-05-20T15:19:39Z")

</div>

Okay, did you check the user profiles configuration?

---

<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:** [May 20, 2024, 3:24pm UTC](https://community.glideapps.com/t/date-pickers/73428/25 "2024-05-20T15:24:38Z")

</div>

Actually, I just had another look and I can replicate the behaviour that you’re seeing.  
I know what’s causing that - it’s the 10 second Glide clock update cycle.

Let me see if I can throw in a fix for that and I’ll re-publish the template.

---

<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:** [May 20, 2024, 3:42pm UTC](https://community.glideapps.com/t/date-pickers/73428/26 "2024-05-20T15:42:42Z")

</div>

> [@jejones](#):
>
> One observation I do have at the moment is that when I put start / end times in, they seem to disspear and write to the table even if I haven’t pressed submit.

@jejones - I’ve fixed that issue, here is an updated template link:

> **[Time Picker Concept](https://go.glideapps.com/template/3CZX4W3EIWBGi9tcmzdX-template-published?privateTemplateToken=ZQubKyZg1WaXMe6v2h6h)**

In this version, you’ll see a column in the Helper table called “StartTimeAsDate”. You will need to reconfigure that column and add your own UTC offset to get the correct starting time, see below:

 ![CleanShot 2024-05-20 at 23.36.57@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/0/008dcd1b85237d6911f838b153c084485c91e727.png)

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 3:58pm UTC](https://community.glideapps.com/t/date-pickers/73428/27 "2024-05-20T15:58:08Z")

</div>

Thank you. I hope you’re ready for some more questions. 😉  
Can I ask you fixed the 10 second time cycle?

---

<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:** [May 20, 2024, 4:17pm UTC](https://community.glideapps.com/t/date-pickers/73428/28 "2024-05-20T16:17:17Z")

</div>

In the original version I used a math column to calculate the Start Time (7am) based on the current date and time. That works fine, except that the current date and time changes every 10 seconds, and every time that happens the absolute values that the choice components reference change. Which invalidates any selection that’s already been made.

To address that, I changed the math formula to instead return an integer representation of the Start Time rounded to the nearest hour, and then converted that back to a date/time value with a Text to Date column. Because that base value will now only change once per hour, the likelihood of that happening whilst the form is being used is much lower. It’s still possible - for example, if you open the form at one minute to the hour, select a start time value and then wait, you should see it disappear as the hour ticks over. But I think that’s probably acceptable, no? 😉

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 5:15pm UTC](https://community.glideapps.com/t/date-pickers/73428/29 "2024-05-20T17:15:27Z")

</div>

I am getting my head around what is happening here however, can you tell me how you added these form elements to the table? I can see this is where the custom form comes from but I’m still not sure how this is added in the layout section.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/7/e71b9e570c2ac77795a56110f62e5c60bbbf6378.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:** [May 20, 2024, 5:23pm UTC](https://community.glideapps.com/t/date-pickers/73428/30 "2024-05-20T17:23:03Z")

</div>

Those are the columns that the form inputs write to. You can think of them as temporary storage for the selected values while the form is in use. If you open the form in the layout, then examine the components, you’ll see that each is targeted at one of those 3 columns.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 5:30pm UTC](https://community.glideapps.com/t/date-pickers/73428/31 "2024-05-20T17:30:00Z")

</div>

I guessed that’s what it was but what I can’t get my head around is how you create the form elements within the table to then use on the front end.  
I know I’m being stupid here.  
My only experience with forms is using the forms container and I think whay you’re doing here is completely different.

---

<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:** [May 20, 2024, 5:35pm UTC](https://community.glideapps.com/t/date-pickers/73428/32 "2024-05-20T17:35:06Z")

</div>

They are not form elements, they are columns. Is it the word form above them that’s throwing you off? That’s just a convenient way to group columns together by the way you name them. If you edit one of them, you’ll see how that works.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 20, 2024, 6:00pm UTC](https://community.glideapps.com/t/date-pickers/73428/33 "2024-05-20T18:00:50Z")

</div>

I think I undertstand now. It was the word that was confusing me. I didn’t realise you could name columns that way.  
I think I’ve got it now. I’m going to create a very simple form and see if I can transfer the inputs to another table to see if my understanding is correct.

Again, thanks for the tuition and the template. This has been invaluable.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 21, 2024, 10:29am UTC](https://community.glideapps.com/t/date-pickers/73428/34 "2024-05-21T10:29:04Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/6/266bfe5d48a2e375be297f395ad8be2cc1525c07.png)  
Can I ask what the significance of these columns are in the users table please?

---

<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:** [May 21, 2024, 10:38am UTC](https://community.glideapps.com/t/date-pickers/73428/35 "2024-05-21T10:38:28Z")

</div>

- `svTimeHelper`: this is a Single Value column that addresses the first row in the Helper Table. Because it’s in the User Profiles table, it allows you to access that row from anywhere in the App. If you examine the saved action on the Add button, you will see how it is used.
- the other two columns are default values for both the starting time (7 = 7am), and the time interval (15 mins). These are used in the math formulas in the helper table. They could be hard coded in those formulas, but defining them as “constants” in the User Profile allows them to be easily changed. For example, if you decided you want to start at 8am instead of 7am, all you need to do is change that 7 to an 8.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 21, 2024, 10:51am UTC](https://community.glideapps.com/t/date-pickers/73428/36 "2024-05-21T10:51:22Z")

</div>

Thank you. I’m just trying to incoporate the tables and associated logic into the app I had already created so trying to understand it all.

---

<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:** [May 21, 2024, 10:53am UTC](https://community.glideapps.com/t/date-pickers/73428/37 "2024-05-21T10:53:32Z")

</div>

No problems. Feel free to continue to ask questions, I don’t mind.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 21, 2024, 11:12am UTC](https://community.glideapps.com/t/date-pickers/73428/38 "2024-05-21T11:12:31Z")

</div>

I assume the contacts and companies tables are superfluous?

---

<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:** [May 21, 2024, 11:24am UTC](https://community.glideapps.com/t/date-pickers/73428/39 "2024-05-21T11:24:13Z")

</div>

Yes. I started with a default App and didn’t bother to remove them.

---

<div class="post-metadata">

**Author:** ![jejones](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@jejones](https://community.glideapps.com/u/jejones)\
**Post date:** [May 24, 2024, 6:23pm UTC](https://community.glideapps.com/t/date-pickers/73428/40 "2024-05-24T18:23:42Z")

</div>

I would like to say a massive thanks to @Darren_Murphy for all the help he has provided to me over the last few days.  
I have not only learned a lot but Darren has produced some very clever solutions to problems I was having.

Thank you so much.

[Previous page](https://community.glideapps.com/t/date-pickers/73428.md?page=1)
