JQueryUIのDatepickerを使用してフォームにいくつかの機能を追加しようとしています。1.開始日ピッカーで日付を選択すると、終了日ピッカーに次の日付が表示されます。2.終了日を開始日未満として選択すると、終了日の前の日付と開始日ピッカーが表示されます。開始日付ピッカーのクリアボタンをクリックすると、終了日付ピッカーが開きます。日付ピッカーにクリアボタンがあります。私はこのようにしたくありません。開始日の日付を選択して終了日ピッカーを開きたい
$( "#start").datepicker({
minDate: new Date(currentYear, currentMonth, currentDate),
showButtonPanel: true,
beforeShow: function( input ) {
setTimeout(addclearbutton, 1 );
},
beforeShowDay: highlightDays,
onChangeMonthYear: function( input ) {
setTimeout(addclearbutton, 1 );
},
onSelect: function (dateStr,input) {
daterangevalidation(dateStr,input);
},
onClose:function() {
$("#end").datepicker('show');
}
});
$( "#end").datepicker({
minDate: new Date(currentYear, currentMonth, currentDate),
showButtonPanel: true,
beforeShow: function( input ) {
setTimeout(addclearbutton, 1 );
},
beforeShowDay: highlightDays,
onChangeMonthYear: function( input ) {
setTimeout(addclearbutton, 1 );
},
onSelect: function (dateStr,input) {
daterangevalidation(dateStr,input);
}
});