Hello @mpbaweb
There are different alternatives.
* You can insert a different Date/time field in form with the corresponding Max date defined, associated to the corresponding choice in the “Membership Category” field (DropDown or radio button)
* Or you can use only one Date/Time field and check it through the equation associated to the calculated field. For example, using the Developer version of the plugin that is distributed with the Date/Time operations module, and assuming that the date/time field is the fieldname2, the category field the fieldname1:
(function(){
var y = DATEDIFF(fieldname2,TODAY(),'dd/mm/yyyy','y')['years'];
if(18 < y && fieldname1 == 'Junior') return 'Invalid date';
if((y <=18 || 65 <= y) && fieldname1 == 'Adult') return 'Invalid date';
if(y < 65 && fieldname1 == 'Pensioner') return 'Invalid date';
/** The other operations in the equation here **/
})()
* Another alternative would be modify the “Max” attribute in the date/time fields programmatically (the following link can give you an idea https://cff.dwbooster.com/documentation#relationship-between-date-fields)
Best regards.