I have restriction javascript code for the date picker in the header for two datepicker fields. It is working on the first page of a multiple page form only. But if i put the date fields on the second page OR if I hit previous to return to the first page and make revisions, the restriction code is not applied. Is there a way to force that code to apply every time that page loads? I need date fields in other sections of the form, not just the first.
<script>
jQuery.noConflict();
jQuery(document).ready(function($) {
$( "#input_1_7" ).datepicker({ minDate: '0', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true, beforeShowDay: function(date){ if (date.getDay() == 0){ return [false,'']; } else { return [true, '']; }} });
});
jQuery(document).ready(function($) {
$( "#input_1_8" ).datepicker({ minDate: '0', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true, beforeShowDay: function(date){ if (date.getDay() == 0){ return [false,'']; } else { return [true, '']; }} });
});
jQuery(document).ready(function($) {
$( "#input_1_39" ).datepicker({ minDate: '0', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true, beforeShowDay: function(date){ if (date.getDay() == 0){ return [false,'']; } else { return [true, '']; }} });
});
</script>