javascript - How to change the background color of current day in jquery datepicker onclick? -
i using jquery datepicker in angularjs, overriding css displaying orange color background current date
.ui-state-highlight{ background-color:orange; }
now requirement background color of current date must changed red when clicked. have tried calling function onselect changes background color in datepicker defaults,but that's not working.how achieve this?
you use onselect event change css of current date
onselect: function(value, date) { date.dpdiv.find('.ui-datepicker-current-day') .addclass('ui-state-highlight'); }
i recommend against using mechanism above, instead override .ui-datepicker-current-day
class
.ui-datepicker-current-day{ background-color:orange; }
that not require js.
Comments
Post a Comment