# 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:** 1

<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 16, 2024, 11:50am UTC](https://community.glideapps.com/t/date-pickers/73428/1 "2024-05-16T11:50:21Z")

</div>

I have 2 date pickers on a form. How can I default the second date picker to the date that has been selected in the first date picker?

---

<div class="post-metadata">

**Author:** ![Carbonsquare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carbonsquare/32/55224_2.png) [@Carbonsquare](https://community.glideapps.com/u/Carbonsquare)\
**Post date:** [May 16, 2024, 2:24pm UTC](https://community.glideapps.com/t/date-pickers/73428/2 "2024-05-16T14:24:52Z")

</div>

I assume you have two Date & Time columns in your data table to support the two distinct dates. If so, set the Default value of the second date picker to the value of the data in the column of the first date picker.

![Default Value](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/4/4462c7e8853b2c6e2686480f37133a02de9bc61c.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 16, 2024, 6:31pm UTC](https://community.glideapps.com/t/date-pickers/73428/3 "2024-05-16T18:31:47Z")

</div>

There are 2 columns however, the first would need to be submitted in order for that to validate.  
What I want it is a form with 2 date pickers. The user selects a date and time on the first field. If they then select a different date on the second field, they get a warning saying that the dates must be the same.

---

<div class="post-metadata">

**Author:** ![Carbonsquare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carbonsquare/32/55224_2.png) [@Carbonsquare](https://community.glideapps.com/u/Carbonsquare)\
**Post date:** [May 16, 2024, 6:47pm UTC](https://community.glideapps.com/t/date-pickers/73428/4 "2024-05-16T18:47:10Z")

</div>

Oh, I see. You need something like a field level action that would populate the second date field after filling in the first one on the current form (and before the Submit button is pressed). Not sure about that one since I don’t think we have field level conditional actions just yet. Maybe one of our Glide Experts has a solution.

---

<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:** [May 17, 2024, 12:05am UTC](https://community.glideapps.com/t/date-pickers/73428/5 "2024-05-17T00:05:57Z")

</div>

So your 2 date pickers must have the same value? Why wouldn’t you just have one, and then use an on-submit action to set the first date to the second date?

---

<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 17, 2024, 12:36am UTC](https://community.glideapps.com/t/date-pickers/73428/6 "2024-05-17T00:36:28Z")

</div>

Indeed. Or why even bother with the second date column at all? 🤔

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [May 17, 2024, 2:05am UTC](https://community.glideapps.com/t/date-pickers/73428/7 "2024-05-17T02:05:12Z")

</div>

Hmmm…if you are picking a vacation in the future (a few months from now) then maybe you want the second date close to the first date and not have to re-enter/scroll through the months to get to the second date. The first date is the start date and the second date is the end date.

🤷‍♂️

---

<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:** [May 17, 2024, 3:11am UTC](https://community.glideapps.com/t/date-pickers/73428/8 "2024-05-17T03:11:19Z")

</div>

That would only make sense with the original post.

> [@jejones](#):
>
> If they then select a different date on the second field, they get a warning saying that the dates must be the same.

Does not make sense with this.

---

<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 17, 2024, 7:46am UTC](https://community.glideapps.com/t/date-pickers/73428/9 "2024-05-17T07:46:39Z")

</div>

Apologies I should’ve been clearer in my original question. Both fields are date and time pickers. The times must be different in both but the dates must be the same.

---

<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 17, 2024, 8:27am UTC](https://community.glideapps.com/t/date-pickers/73428/10 "2024-05-17T08:27:54Z")

</div>

ah, that makes more sense.

A couple of questions for you:

- Are you open to a solution that uses a Custom Form? It’s a little bit of work to set up, but can provide a nicer user experience, as well as the validation that you’re looking for.
- Is there a range for the times (example 7am to 7pm), or could they be any times within the 24 hour period?
- Does the user need to enter the times to the exact minute, or could it be a selection from (for example) 10 or 15 minute blocks?
- Presumably the second time must be later than the first time?

---

<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 17, 2024, 10:05am UTC](https://community.glideapps.com/t/date-pickers/73428/11 "2024-05-17T10:05:47Z")

</div>

Thanks for responding.

I am open to using a custom form. I have looked for some tutorials on this but must admit, I’m a bit lost.  
At the moment, the time is selected using the clock dials on the picker however, I do think it would look better if I could present a dropdown of times (say 07:00 - 18:00 in 15 minute intervals). I still need to calculate the total time between both sets of data though as I’m using this to calculate pay based on an hourly rate if that makes sense.

And yes, the second time should later than the first.

---

<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:** [May 18, 2024, 12:25am UTC](https://community.glideapps.com/t/date-pickers/73428/12 "2024-05-18T00:25:44Z")

</div>

What plan are you on at the moment? There’s a possibility to use the native form plus CSS to block the submit button if the validation doesn’t return true.

---

<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 18, 2024, 12:32pm UTC](https://community.glideapps.com/t/date-pickers/73428/13 "2024-05-18T12:32:29Z")

</div>

I’m on the free plan at the moment.

---

<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 18, 2024, 12:46pm UTC](https://community.glideapps.com/t/date-pickers/73428/14 "2024-05-18T12:46:43Z")

</div>

Hey, sorry for not getting back to you. I have a solution in mind, but it’s a little complicated to setup so I was intending to make a short video for you. If you can wait for a bit, I’ll get that done tonight or tomorrow.

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [May 18, 2024, 1:27pm UTC](https://community.glideapps.com/t/date-pickers/73428/15 "2024-05-18T13:27:39Z")

</div>

So, you mean that both columns must have the same date, but the times can be different, where the time in the second column must be later than the time in the first column?

---

<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 18, 2024, 4:34pm UTC](https://community.glideapps.com/t/date-pickers/73428/16 "2024-05-18T16:34:29Z")

</div>

Thanks Darren. I would appreciate that.

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [May 18, 2024, 11:46pm UTC](https://community.glideapps.com/t/date-pickers/73428/17 "2024-05-18T23:46:08Z")

</div>

We are all waiting with bated breath 🙂

Don’t get too distracted watching Shane Lowry!

Thanks for all you contribute.

---

<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 19, 2024, 10:18am UTC](https://community.glideapps.com/t/date-pickers/73428/18 "2024-05-19T10:18:17Z")

</div>

Below is a link to a Concept App Template that demonstrates the solution that I had in mind. You can copy it and study it to see how it works. Note that it assumes that the user will always be signed in.

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

Essentially it uses a Helper Table to construct a list of Times to use in two choice components, which are presented in a custom form, with appropriate validation applied.

---

<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 19, 2024, 8:36pm UTC](https://community.glideapps.com/t/date-pickers/73428/19 "2024-05-19T20:36:58Z")

</div>

This looks very close to what I was originally trying to achieve Darren.  
Thank you for that. I will inspect the logic tomorrow.

When I try to add an entry, it does work however, I also get an error. Not sure why.

---

<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 19, 2024, 8:42pm UTC](https://community.glideapps.com/t/date-pickers/73428/20 "2024-05-19T20:42:28Z")

</div>

It won’t work if you’re viewing as a template, because it requires a signed in user. But if you copy it, add a user to the users table, then view as that user, it will work.

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