how can we make a date shown in bold format?
var events = {};
events[new Date('02/14/2011')] = new Event('Valentines Day', 'mybold');
events[new Date('02/18/2011')] = new Event('Payday', 'mybold');
$('#calender').datepicker({
changeMonth : true,
changeYear : true,
beforeShowDay : function(date) {
var event = events[date];
if (event) {
return [ true, 'mybold', event.text ];
} else {
return [ true, '', '' ];
}
}
});
.
.
.
.
<style>
.mybold>a {
font-weight:bold;
background-color: yellow !important;
background-image: none !important;
}
</style>
It is showing the background colour as yellow but not showing the text in bold? Thanks
You should do
.mybold>a.ui-state-default {
font-weight:bold;
background-color: yellow;
background-image: none;
}
fiddle here http://jsfiddle.net/3dHWh/2/
This works because targeting an element with a class is stronger than targeting an element generally, and for this reason you were not overriding the standard ui theme (so no need for !important
at all)