次のコードで作成するdatepickerがあります。入力用の2番目の日付ピッカーを作成する
$('.myClass').find('input').datepicker({showOn: 'button',
buttonText: 'Date'});
ユーザーがチェックボックスをオンにした場合、その日付ピッカーのオプションを変更したいと思います。私は次のことを試みたが、私は運がない。
$('.myClass').datepicker('destroy');
//I didnt have this line intially but was reading it may be necessary
$('.myClass').removeClass('hasDatepicker').removeAttr('id');;
$('.myClass').find('input').datepicker({showOn: 'button',
buttonText: 'Date', firstDay: 1, showWeek: true});
'.datepicker(" option "、options)'でオプションを変更するだけではどうですか? http://jqueryui.com/demos/datepicker/#method-option – ToddBFisher