PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Limit date field to only current date and future dates –Within WordPress

  1. Leesa - from Boston
    Member

    Hello,
    Trying to add a current date to future dates within the calendar. Yes, I tried to follow along with the related posts in the forum. They appeared helpful, but if your using WordPress they all end up sending you to codex. Those suggested script edits are more advanced and a migraine was the only outcome here. JQuery wizard I am not.

    Has anyone else using "WordPress" actually accomplish this task?

    I appreciate any assistance.

    Thank you in advance.
    Lees from Boston

    Posted 12 years ago on Thursday March 22, 2012 | Permalink
  2. I'm in the same boat as Leesa. It would be really nice if we could opt for current or future dates only.

    Posted 12 years ago on Sunday March 25, 2012 | Permalink
  3. fcandillo
    Member

    I'm also looking for a way to make the date picker allow the date 7 days from today.

    Posted 12 years ago on Saturday March 31, 2012 | Permalink
  4. I'm in need of this too. And would greatly appreciate being able to block a certain amount of time ahead as well.

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  5. The datepicker element is straight from the jQuery UI library and you can pass a variety of parameters to that to exclude dates, set ranges, etc.

    http://docs.jquery.com/UI/API/1.8/Datepicker

    You would still need to modify your theme files to add the appropriate jQuery scripting with the datepicker parameters to the header.php file.

    You can set a minimum or date/range for the datepicker. Eventually, we plan to add some of these parameters as built in options on the date field. For now, you can read up on the links below for the info you need. A quick Google search will turn up several more examples.

    http://docs.jquery.com/UI/Datepicker#option-minDate

    http://stackoverflow.com/questions/1786411/jquery-datepicker-to-prevent-past-date

    http://davidwalsh.name/jquery-datepicker-disable-days

    Posted 12 years ago on Tuesday April 24, 2012 | Permalink
  6. m.cabiles
    Member

    Hi Kevin,

    Thanks for the info... I was able to change the limit for the DatePicker UI, but not for the DropDown Date... Please advise how to do that...

    Thanks

    Posted 12 years ago on Monday July 30, 2012 | Permalink
  7. I could use some direction (will pay if it's a load of work). I have this site - http://www.sublimecupcakes.com/place-an-order/ that after the location is chosen the date picker is available. I need to blank out past days as well as the current day, since cupcakes need to be ordered 24 hours in advance. If anyone has an idea on how to limit those things that would be great.

    Also bonus goes to someone who can suggest a method for disabling July 4th and Christmas day as we are closed then.

    Thanks, Jonathan

    Posted 12 years ago on Wednesday November 21, 2012 | Permalink