Datepicker - how do I restrict the date range used by the datepicker plugin using input from the user

Datepicker - how do I restrict the date range used by the datepicker plugin using input from the user

Would like to see an example of how to set the date range for the datepicker plugin. On my page there is an input for the user to select the year ( id='yearpicked') that they want to enter data for and an input for the user to select the month (id = 'monthpicked') that they want to enter data for.  Each input would have an onchange=restrictdatepicker()

So in the javascript code I can figure out what year and month the user has selected:

yearpicked = document.getElementById('yearpicked').value

monthpicked = document.getElementById('monthpicked').value

Now how do I use those values to restrict the datepicker to what the year and month the user can pick?


Thanks,
JerryB