Mar 2nd, 2012, 11:49 AM
People of the Form Tools Forum,
I'm working on using the Form Builder and Custom Fields to replace my current process of manually creating my event registration forms.
One of the things I need to do is limit the dates that the user can choose in the datepicker. I've already duplicated the Date field type, and called mine Start End Date. I've added the settings "Min Date" and "Max Date" and have given them a unique identifier.
I've modified the class name in the "Displaying / Edit Field" and "Javascript" tabs. I *can* set the min / max dates by adding them to the default_settings on the javascript tab, however, I can't get the new settings to update the datepicker.
It appears that it's using the jQuery UI datepicker, so I tried adding this code to the Edit Field tab, right above the field itself (wrapped in script tags):
$( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) );
I've tried setting the .selector to my field's ID, name, and unique class, with no luck.
Any pointers?
Thanks,
Glen
I'm working on using the Form Builder and Custom Fields to replace my current process of manually creating my event registration forms.
One of the things I need to do is limit the dates that the user can choose in the datepicker. I've already duplicated the Date field type, and called mine Start End Date. I've added the settings "Min Date" and "Max Date" and have given them a unique identifier.
I've modified the class name in the "Displaying / Edit Field" and "Javascript" tabs. I *can* set the min / max dates by adding them to the default_settings on the javascript tab, however, I can't get the new settings to update the datepicker.
It appears that it's using the jQuery UI datepicker, so I tried adding this code to the Edit Field tab, right above the field itself (wrapped in script tags):
$( ".selector" ).datepicker( "option", "minDate", new Date(2007, 1 - 1, 1) );
I've tried setting the .selector to my field's ID, name, and unique class, with no luck.
Any pointers?
Thanks,
Glen