Title: past dates additional
Last modified: February 1, 2017

---

# past dates additional

 *  Resolved [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/)
 * Is it possible to prevent picking a date that is less than server date?
    It is
   possible to prevent selecting a previous year but supposing it is February 16
   2017, it is currently possible to select a date in January 2017.
 * Note: I am using the PRO version and have your jQuery hooked variances in functions.
   php
 * Many thanks

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8728398)
 * I have updated the plugin and release 1.2.9 with minDate and maxDate options.
   In your case, you need to manage with -1 for yesterday and +1 for tomorrow. Same
   like this you can increase the numbers to restrict the range.
 * So you can use “0” zero for only present date selection with minDate and leave
   empty the maxDate for no limit further. Or you can use number days with “+”.
 * Alternatively you can restrict the years range with “2017:2020”. Let me know 
   if it works for you.
 *  Thread Starter [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8729734)
 * I ran the update and problem 1 is it immediately reverted to non PRO version
 * use of minDate and maxDate, like this?
 * $(‘#available_from, #available_to, input[name=”confirmstartdate”]’).datepicker({
   dayNamesMin: [‘S’, ‘M’, ‘T’, ‘W’, ‘T’, ‘F’, ‘S’], dateFormat: “yy-mm-dd”, changeMonth:
   true, changeYear: true, minDate:”0″, maxDate:””, closeText: “”, currentText: “”,
   yearRange: “-0:+50”});
 * above had no effect do I need to drop yearRange?
 *  Thread Starter [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8729816)
 * resolved the PRO problem by re-downloading latest PRO version and re-installing
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8729977)
 * yearRange should be like 2017:2020 etc. and you may drop it if you don’t to restrict
   future years.
 *  Thread Starter [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8729982)
 * answer came almost instantaneously, drop yearRange and minDate/maxDate works 
   perfectly.
    This addition to the plugin makes it way more versatile and the owner/
   developer of it is passionate about supporting it.
 * Many many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘past dates additional’ is closed to new replies.

 * ![](https://ps.w.org/wp-datepicker/assets/icon-256x256.gif?rev=2286804)
 * [WP Datepicker](https://wordpress.org/plugins/wp-datepicker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-datepicker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-datepicker/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-datepicker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-datepicker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-datepicker/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/past-dates-additional/#post-8729982)
 * Status: resolved