Hi Chris
Sorry for the long delay.......here is a link to the form using our own custom datepicker.
http://www.allinclusivefyi.com/
As you can see by playing around with the two calendar fields, the second date field is tied to the first, so that even if you go a few months into the future, the second date picks up where the first date is set.
The two fields themselves are set as a Text field because the Date field only works with your datepicker, or displays as three separate fields (month, day, year). Our config script for our datepicker finds those text fields by their ID, displays the calendar icon, shows 2 months side-by-side, and ties the two dates together. At the end of this post I put the config code that we use, but if you need it I can also include the jquery minimized .js also - it's just hard to read because I don't have an unminimized version.
The problem is not with *using* our calendar, it works fine, but if I make those required fields (which they need to be) and they are not filled in, then upon form validation they become inactive and can't be used.
So there is something in the validation code that renders them useless.
I have spent a lot of time trying to modify the configuration for the datepicker included with gravity forms, and cannot get it to behave like our custom datepicker, even after spending days on the jQuery site and trying many different things.....
Also, because you're using some custom class names for your styles, I'm not able to use our own stylesheets and can't get yours to look remotely like ours - all of the other datepicker themes I've looked at stayed very consistent with class names, so all we had to do was modify our stylesheet, but that doesn't work here - there's no allowances for rounded corners or overlays.
Here is how ours is configured:
[js]
$(function() {
$("#DepartureDate").datepicker(
{
"showOn": "both",
"numberOfMonths": 2,
"buttonImage": "/img/calendar.gif",
"buttonImageOnly": true,
"minDate": 0,
"onSelect": function(dateText, inst) {
$('#ReturnDate').datepicker('option', 'minDate' ,new Date(dateText));
}
}
);
$("#ReturnDate").datepicker(
{
"showOn": "both",
"numberOfMonths": 2,
"buttonImage": "/img/calendar.gif",
"buttonImageOnly": true,
"minDate": +1
}
);
});
Posted 13 years ago on Tuesday September 20, 2011 |
Permalink