# Max date in picker

**URL:** <https://community.weweb.io/t/max-date-in-picker/19580>\
**Category:** Ask us anything\
**Created:** [August 7, 2025, 1:29am UTC](https://community.weweb.io/t/max-date-in-picker/19580 "2025-08-07T01:29:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SynopsisLabs](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@SynopsisLabs](https://community.weweb.io/u/SynopsisLabs)\
**Post date:** [August 7, 2025, 1:29am UTC](https://community.weweb.io/t/max-date-in-picker/19580/1 "2025-08-07T01:29:41Z")

</div>

Hi,

I am using a date picker and am using the max date formula - formatDate(addDays(date(),1,“YYYY-MM-DD”).

This shows up to today’s date but does not allow me to select it. If I use date(),2, you can select today’s date but tomorrow’s date is not greyed which gives the impression that it can be selected.

[Screen Capture video here](https://screenrec.com/share/7uYVSlLwic)

How do I get the picker to show today’s date as the max that can be selected and allow me to select it.

Thanks  
Steve

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [August 7, 2025, 1:39am UTC](https://community.weweb.io/t/max-date-in-picker/19580/2 "2025-08-07T01:39:31Z")

</div>

try something like this

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/43b0270ce6ce9ae1290e2dec4c982e294206ba12.png)

---

<div class="post-metadata">

**Author:** ![SynopsisLabs](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@SynopsisLabs](https://community.weweb.io/u/SynopsisLabs)\
**Post date:** [August 7, 2025, 8:09pm UTC](https://community.weweb.io/t/max-date-in-picker/19580/3 "2025-08-07T20:09:48Z")

</div>

This has the same behaviour, todays date is shown as the current value but in the date picker it is not selectable.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/77f78b0c67b0655a6477b7cf46dc2e38719843b2.png)

---

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [August 7, 2025, 9:51pm UTC](https://community.weweb.io/t/max-date-in-picker/19580/4 "2025-08-07T21:51:10Z")

</div>

sorry maybe I don’t understand, in your image today isn’t the current value of the date picker its just highlighted as a reference. See in the attached image the 22nd is the current value and today has a boarder. If you want to set the current value on load you can set the initial value.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/62854bff7e6dbdd1bf033dbfc9c0208a0c6b714e.png)

---

<div class="post-metadata">

**Author:** ![SynopsisLabs](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@SynopsisLabs](https://community.weweb.io/u/SynopsisLabs)\
**Post date:** [August 7, 2025, 9:58pm UTC](https://community.weweb.io/t/max-date-in-picker/19580/5 "2025-08-07T21:58:52Z")

</div>

My dates are yyyy-mm-dd so the date shown in the current value “2025-08-07” is correct. And it is highlighted with the border as today’s date on the picker but I cannot select it.

I believe that the behaviour is more date \< today’s date rather than date \<= today’s date.

---

<div class="post-metadata">

**Author:** ![SynopsisLabs](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@SynopsisLabs](https://community.weweb.io/u/SynopsisLabs)\
**Post date:** [August 7, 2025, 10:05pm UTC](https://community.weweb.io/t/max-date-in-picker/19580/6 "2025-08-07T22:05:03Z")

</div>

Got AI to write me javascript which works -

```auto
// Get current date
const today = new Date()
// Set time to end of day (23:59:59.999) to include all of today
today.setHours(23, 59, 59, 999)
// Return ISO string format
return today.toISOString()

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bee40a614c5b74fbef4e7bb6f73d022e2b8203e3.png) [@system](https://community.weweb.io/u/system)\
**Post date:** [October 21, 2025, 1:29am UTC](https://community.weweb.io/t/max-date-in-picker/19580/7 "2025-10-21T01:29:51Z")

</div>

This topic was automatically closed after 75 days. New replies are no longer allowed.
