I was using an ID selector to modify each of my date fields on a form in my JavaScript:
if ($('#input_6_16').length) {
$('#input_6_16').datepicker({minDate: '+0', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wordpress/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true});
}
And I was including the image because I had read in another thread that overriding the picker required including the image again. And this way works great!
But this is getting somewhat tedious to have to do for each form and field (6+ forms some with 2+ date fields). I was hoping I could use a class selector instead to modify the UI datepicker for each date on a form:
if ($('.ff-date input.datepicker').length) {
$('.ff-date input.datepicker').datepicker({minDate: '+0', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wordpress/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true});
}
Then for each date field on a form I add ff-date in the CSS class advanced setting. But this doesn't seem to work at all.
Is it not possible to modify a datepicker using class selectors? Do you have to use ID selectors?
Thanks