# Dates - Stop people picking dates that has already gone

**URL:** <https://community.gravityforms.com/t/dates-stop-people-picking-dates-that-has-already-gone/13965>\
**Category:** Get Help\
**Tags:** gform\_datepicker\_options\_pre\_init, date, datepicker\
**Created:** [November 29, 2022, 5:01am UTC](https://community.gravityforms.com/t/dates-stop-people-picking-dates-that-has-already-gone/13965 "2022-11-29T05:01:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannah.selbie](https://avatars.discourse-cdn.com/v4/letter/h/59ef9b/32.png) [@hannah.selbie](https://community.gravityforms.com/u/hannah.selbie)\
**Post date:** [November 29, 2022, 5:01am UTC](https://community.gravityforms.com/t/dates-stop-people-picking-dates-that-has-already-gone/13965/1 "2022-11-29T05:01:52Z")

</div>

Any advise on how I can get people to stop people picking dates that have already gone?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [November 30, 2022, 5:43pm UTC](https://community.gravityforms.com/t/dates-stop-people-picking-dates-that-has-already-gone/13965/2 "2022-11-30T17:43:25Z")

</div>

Please see example 9 of the gform\_datepicker\_options\_pre\_init() filter:

> **[gform\_datepicker\_options\_pre\_init](https://docs.gravityforms.com/gform_datepicker_options_pre_init/#h-9-disable-past-dates)**
>
> This filter can be used to modify the options used to initialize a fields datepicker.

That will prevent someone from selecting a date in the past in a datepicker.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [December 2, 2022, 6:34am UTC](https://community.gravityforms.com/t/dates-stop-people-picking-dates-that-has-already-gone/13965/3 "2022-12-02T06:34:18Z")

</div>

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