# 🆕 Date ranges for date picker & date time picker

**URL:** <https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429>\
**Category:** Ask for Help\
**Created:** [August 13, 2021, 1:02pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429 "2021-08-13T13:02:37Z")\
**Posts on this page:** 10\
**Page:** 1

<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:** [August 13, 2021, 1:02pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/1 "2021-08-13T13:02:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6dcb08442731d044fa3cc5b6b4ab14be5150d315.png)

We now have ranges for date picker & date time picker.

It still renders a calendar, but dates outside of the range are not clickable.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [August 13, 2021, 10:03pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/2 "2021-08-13T22:03:22Z")

</div>

Hallelujah!!!

Mark this one as done!

> [@Filter on Date Picker](https://community.glideapps.com/t/filter-on-date-picker/23160):
>
> Would be nice to have a filter on date and date/time picker. Users would still SEE dates, but they’d be unclickable given the filter. eg. Filter date picker where date is on or after today = users couldn’t select a date in the past.

---

<div class="post-metadata">

**Author:** ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)\
**Post date:** [August 14, 2021, 3:37am UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/3 "2021-08-14T03:37:34Z")

</div>

Yeah!!!

---

<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:** [August 25, 2021, 8:03am UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/4 "2021-08-25T08:03:32Z")

</div>

A useful extension to this would be to allow for a column value to be used in the range options, instead of just the fixed values that we have now.

For example: I might want to allow a date in the future, but no more than one month in the future. I could have a math column that calculates now+1 month, and then use that column as the upper range limit for the date picker.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [August 25, 2021, 12:29pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/5 "2021-08-25T12:29:33Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [October 15, 2021, 3:52am UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/6 "2021-10-15T03:52:21Z")

</div>

Hi Darren,

But how can I do if let say the Start Date is 20 Oct 2021.  
I want the End Date can be selected from the Start Date and later ?

---

<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:** [October 15, 2021, 4:00am UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/7 "2021-10-15T04:00:22Z")

</div>

You can’t do that with the date picker options, but you could apply some logic in the GDE to force it.

Using your example, you could create an if-then-else column:

- If end date is before Start Date then Start Date
- Else end date

Then use the value of this if-then-else column as your end date filter.

This wouldn’t stop a user from selecting an end date earlier than the Start Date, but if they do it will automatically be adjusted to that date.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [October 15, 2021, 6:02am UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/8 "2021-10-15T06:02:53Z")

</div>

Got it, Darren.  
Thanks to you.

---

<div class="post-metadata">

**Author:** ![Guillaume\_RABALLAND](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/guillaume_raballand/32/35847_2.png) [@Guillaume\_RABALLAND](https://community.glideapps.com/u/Guillaume_RABALLAND)\
**Post date:** [December 8, 2021, 10:32pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/9 "2021-12-08T22:32:49Z")

</div>

Of course, I thought about displaying a warning message to user using this trick but I think it would be more comfortable for app builders to have also the opportunity to choose a custom date instead of ‘today’ directly in the range option of the date picker and actually force the user to select an end date after the start date. Because I can’t display a warning because the data row is not created yet when it is in an add form (or tell me how if I can).

---

<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:** [December 8, 2021, 11:27pm UTC](https://community.glideapps.com/t/date-ranges-for-date-picker-date-time-picker/30429/10 "2021-12-08T23:27:14Z")

</div>

You can do that with a custom form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…
