Gravity Forms is quite possibly the best forms plugin available for WordPress, but even with the vast array of functionality it offers right out of the box it still has its limitations.

One such limitation is the date picker field, offers practically no chance of configuration.

Recently a client asked to have their date picker so it would only select dates in the future, and while Gravity Forms has no way of doing this, fortunately there’s an easy jQuery fix, since Gravity forms uses jQuery standard date picker.

Simply add the following script code to your page/page template before where the form appears, substituting the #input_1_10 part with the form field ID of the datepicker field ID on your form.

<script type=”text/javascript”>
jQuery(document).ready(function($) {
$( “#input_1_10” ).datepicker({ minDate: ‘+0d’ });

To set the form to select dates that appear further in the future or perhaps only a week previous, change the +0d (plus zero days) part to something suited to your particular requirements (i.e. +14d to only allow dates two weeks in the future).