Andrea Ho provato cosi ma rimangono sempre disabilitati

codice:
(function($) {
  $.fn.toggleDisabled = function()
 {
    return this.each(function() 
{
      this.disabled = !this.disabled;
      if ($(this).datepicker("option", "disabled")) 
{
        $(this).datepicker("option", "disabled", false);
      } else
 {
        $(this).datepicker("option", "disabled", true);
      }


    });
  };
})(jQuery);


$("#tipologia").change(function() {
var v = $(this).val();
if (v=='Hotel') {
$(".filtertypeinput").toggleDisabled();
}
});




$("#from").datepicker({
  showOn: "button",
  buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
  buttonImageOnly: true,
  buttonText: "Select date",
  defaultDate: "+1w",
  changeMonth: true,
  changeYear: true,
  numberOfMonths: 1,
  onClose: function(selectedDate) {
    $("#to").datepicker("option", "minDate", selectedDate);
  }
});


$("#to").datepicker({
  showOn: "button",
  buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif ",
  buttonImageOnly: true,
  buttonText: "Select date",
  defaultDate: "+1w",
  changeMonth: true,
  changeYear: true,
  numberOfMonths: 1,
  onClose: function(selectedDate) {
    $("#from").datepicker("option", "maxDate", selectedDate);
  }
});