Title: Datepicker Range
Last modified: August 21, 2016

---

# Datepicker Range

 *  [vrushank](https://wordpress.org/support/users/vrushankpb/)
 * (@vrushankpb)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/datepicker-range/)
 * I’m trying to restrict the ability to choose certain dates with the datepicker
   add-on. I’m assuming this is easy, but I can’t seem to find a way to manipulate
   the edit screen. It should be a minDate and maxDate value as detailed here
 * [http://jqueryui.com/datepicker/#min-max](http://jqueryui.com/datepicker/#min-max)
 *     ```
       <script>
       $(function() {
       $( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
       });
       </script>
       ```
   
 * I’ve searched through the plugins ‘datepicker’ core files and can’t seem to find
   where exactly to add the code in.
 * If anyone can help me or show me how to implement taht would be greatly appreciated.
 * Thanks!
 * [https://wordpress.org/plugins/advanced-custom-fields/](https://wordpress.org/plugins/advanced-custom-fields/)

Viewing 1 replies (of 1 total)

 *  [Mike](https://wordpress.org/support/users/manndtp/)
 * (@manndtp)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/datepicker-range/#post-4941389)
 * They have made it a little tricky for us to do just what you want, but I’ve found
   where to put this.
 * It is in advanced-custom-fields/core/fields/date_picker/date_picker.php. Line
   63 look like this:
 *     ```
       'isRTL'             => isset($wp_locale->is_rtl) ? $wp_locale->is_rtl : false,
       ```
   
 * Right below that, add in this:
 *     ```
       'minDate'             => '-20',
       'maxDate'             => '+1M +10D'
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Datepicker Range’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [datepicker](https://wordpress.org/support/topic-tag/datepicker/)
 * [range](https://wordpress.org/support/topic-tag/range/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mike](https://wordpress.org/support/users/manndtp/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/datepicker-range/#post-4941389)
 * Status: not resolved