Is there a way to only show predefined dates when using the date picker field? I would like to use this to let the users pick between certain available dates.
Is there a way to only show predefined dates when using the date picker field? I would like to use this to let the users pick between certain available dates.
We use the JQuery Datepicker plugin, and as such, you are limited to the features of that specific tool. It doesn't allow you to easily block out dates. Check out more details and documentation here:
Hi everybody!
Any updates on this? I also would like to let the users pick between certain available dates.
Best regards
Sammet
There are no updates to this functionality.
Heya - I'm looking for this too. Specifically to be able to block any dates prior to Today from being selected. I see in the Datepicker documentation that there are minDate and maxDate options...any idea of how to integrate these either through the form or through functions.php?
cheers,
-jennyb
Actually, you would use JavaScript in your theme's header.php or custom JS location to add in JavaScript from the examples they have listed on their page.
For example
<script>
$(function() {
$( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
});
</script>
The above code would go in your header.php theme file before the </head> and would allow you to select a range of 20 days before and one month and ten days after today.
Yes, just found this post http://www.gravityhelp.com/forums/topic/calendar-does-the-date-picker-still-allow-users-to-pick-dates-in-the-past
And it works great! Am now wondering if there is a way to block the field? Because I notice that we have users who are able to enter non-sensical data - I'd like to be able to force them to use the calendar to eliminate possible error...ideas?
(sorry for the double post!)
-jennyb
Just found this...too bad he didn't share his code, would've been helpful! :)
http://www.gravityhelp.com/forums/topic/value-control-after-submit
Did you still need help with something here? I thought we took care of the problem over here: http://www.gravityhelp.com/forums/topic/calendar-does-the-date-picker-still-allow-users-to-pick-dates-in-the-past#post-184133
Please let me know if I can close this topic.