私はWebアプリケーションを開発しています。このアプリケーションでは、jquerydatepickerプラグインを使用しました。インライン日付ピッカーとして日付ピッカーを使用しています。日付を選択すると、cssクラスを削除しようとしてui-state-highlight
いますが、datepickerに反映されていません。
$("#start_date").datepicker({
beforeShowDay: greySelectedDateRange,
maxDate: 0,
onSelect: function (dateText, inst) {
console.log(dateText);
var toDaysDate = getCurrrentDate('mdy'); //function returning current date
console.log(toDaysDate);
//When the selected date is equal to current date
if (dateText == toDaysDate) {
$(this).find('a.ui-state-active')
.removeClass('ui-state-highlight')
.find('.ui-datepicker-today a'));
//$(this).datepicker("refresh");
//console.log($(this));
}
}
});
コンソールが表示されたらconsole.log($(this));
削除されていますが、調べてもcss class(ui-state-highlight
)が残っているので、解決策を提案してください。
前もって感謝します。