Multiple options of Datepicker with dynamic date selection

Multiple options of Datepicker with dynamic date selection

Hi, I am using datepicker multiple times on one page and want to be able to control the date range of each input dynamically and not rely on the hard coded javascript.

$( "#datepicker_1" ).datepicker({ minDate: -0, maxDate: "+2M +0D", dateFormat: 'dd/mm/yy' });

so looking to pass the variables from the input field to the javascript, variable to be changed dynamically are minDate and maxDate

is this possible? Thanks.