datepicker : onSelect, remove highlight class

datepicker : onSelect, remove highlight class

Hi, currently I have a datepicker that by defoult will highlight entire week (mon-sun), i'm stuck with the onSelect function, I want that onSelect only the date that have been select will highlight. Meaning that onSelect I want to remove the highlighted week.

Here my code :
  1. $('#datepicker').datepicker({ dateFormat: 'yy/mm/dd', firstDay: 1, beforeShowDay: highlightDays, onSelect: function(dateText, inst) { $("#datepicker").removeClass('highlight'); var dateString = dateText; var year = dateString.substring(0,4); var month = dateString.substring(5,7); var day = dateString.substring(8,10); var date = new Date(year, month-1, day); $('#type').val(date); $("#gridcontainer").swtichView("day").BcalGetOp(); showhideToday('day'); glbView = "day"; } });
  2. /*to color default week/month */ table.ui-datepicker-calendar td.highlight a { background-color: #FFFFFF; filter:alpha(opacity=70) !important; /* IE */ -moz-opacity:0.7 !important; /* Mozilla */ opacity: 0.7 !important; /* CSS3 */ color:#212121 !important; }
Thanks