jQuery DatePicker - Set the date range (minDate, maxDate or startDate, endDate) programatically

jQuery DatePicker - Set the date range (minDate, maxDate or startDate, endDate) programatically

Hello,

I have a jQuery date picker which is initalised such that the user can select any date.

I also have a product dropdown. When the user selects a product from the product dropdown I want to be able to set the said datepicker' date range (ie. minDate, maxDate or startDate, endDate) to a certain start date and end date so that the user can only select dates from the date range allowed for that product.

Is it possible  to acomplish this in code after the jQuery datepicker has been initalised.

I have googled for a day now. All help will be highly appreciated.

(I'am using ASP.NET 3.5 and latest versions of jQuery and jQuery UI)

Best Regards
dm7777