# Custom date selection - possible?

**URL:** <https://community.glideapps.com/t/custom-date-selection-possible/34655>\
**Category:** Ask for Help\
**Created:** [November 17, 2021, 1:41pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655 "2021-11-17T13:41:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jac\_Evans](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jac_evans/32/3476_2.png) [@Jac\_Evans](https://community.glideapps.com/u/Jac_Evans)\
**Post date:** [November 17, 2021, 1:41pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/1 "2021-11-17T13:41:32Z")

</div>

I would like a user to be able to select a date but only want them to be able to select a monday in the past. Is this possible?

One option would be a dropdown with the last 20 mondays in but I would prefer to avoid manually changing a list if possible!

Thanks

---

<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 17, 2021, 1:53pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/2 "2021-11-17T13:53:49Z")

</div>

mmm, that’s an interesting one.  
The Date Picker component does provide an option to only allow dates in the past, but not specific days of the week. However, that doesn’t mean it isn’t possible.

How far back would you want to go? You mentioned the past 20 Mondays - is that it, or could it be any Monday in the past? 1 year ago, 20 years ago?

It wouldn’t be too difficult to dynamically generate the values for a select list based on the current date, using a bit of date math. But that probably wouldn’t be a practical option if there was no limit to how far you could go back.

---

<div class="post-metadata">

**Author:** ![Jac\_Evans](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jac_evans/32/3476_2.png) [@Jac\_Evans](https://community.glideapps.com/u/Jac_Evans)\
**Post date:** [November 17, 2021, 2:11pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/3 "2021-11-17T14:11:43Z")

</div>

Probably 6 months is enough so I suppose it would be fairly easy to automate. I am using the native databse rather than sheets. Would you just use Zapier or something to manage that list?

---

<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 17, 2021, 2:25pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/4 "2021-11-17T14:25:07Z")

</div>

No, I’m pretty sure it can be done with computed columns, no need for anything external.  
Give me a little while - I’ll have a fiddle and come back to you with an example.

---

<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 17, 2021, 2:42pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/5 "2021-11-17T14:42:55Z")

</div>

Okay, here you go. You’ll need a table with two columns, and one row for each week that you want to go back in time. So for 6 months, 26 rows give or take.

- The first column should be a number column, and fill it with incrementing numbers, beginning at zero
- The second column should be a math column, using the following formula: `Today+2-Weekday(Today)-(Offset*7)`, where:  
– Today is the special Now value (current date/time)  
– Offset is the value in the first column

Then you can use the math column as the source of a choice component.

Here is how it looks:

 ![Screen Shot 2021-11-17 at 10.37.24 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/a/aaec0d0c7fee8f2e9088673c0c5f98d4a2c23cab.png)

 ![Screen Shot 2021-11-17 at 10.51.21 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b397f87fd34312297281d5c6cc5712bf1f79d83c.png)

---

<div class="post-metadata">

**Author:** ![Jac\_Evans](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jac_evans/32/3476_2.png) [@Jac\_Evans](https://community.glideapps.com/u/Jac_Evans)\
**Post date:** [November 17, 2021, 2:47pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/6 "2021-11-17T14:47:24Z")

</div>

Clever - thank you!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 18, 2021, 2:48pm UTC](https://community.glideapps.com/t/custom-date-selection-possible/34655/7 "2021-11-18T14:48:20Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
