i have looked around before posting my question
following what i am looking in my datepicker (start date and end date):
1) Start date: can b
I prefer to write a default configuration for the datepicker using a class so that it works with more than one with less duplicates.
onSelect: function(dateText, inst){
// Check if _until exists and auto set mindate
if(inst.id.contains("_from")){
$("#"+inst.id.replace("_from", "_until")).datepicker("option", "minDate", dateText);
}
}
This works assuming your form IDs are consistent. E.g I use date_until and date_from