JS and CSS combination in Content editor Web part and add calendar list list view web part on page
------------------------------------------------------------------------------------------------------------------------
<style>
.ms-acal-item{height: 10px !important;}
.ms-acal-sdiv,
.ms-acal-mdiv,
.ms-acal-ctrlitem,
.ms-acal-month-weeksel,
.ms-acal-title,
.ms-acal-month-top span{display: block;}
.ms-acal-summary-itemrow TD DIV{height: 14px !important;}
.ms-acal-vlink td{display: none;}
.ms-acal-sdiv {display: none}
</style>
<script type="text/javascript">
$(document).ready(function(){
var url = _spPageContextInfo.webAbsoluteUrl +"/Lists/Events/AllItems.aspx";
$('#events').attr("href",url);
$dates = $('.ms-acal-summary-dayrow > td');
$dates.each(function(){
$(this).removeAttr("evtid");
$(this).removeAttr("date");
$(this).css("cursor", "default");
});
$day = $('.ms-acal-month-top span');
$day.each(function(){
var wk = $(this).text();
$(this).text('');
wk = wk.substring(0,1);
$(this).text(wk);
$(this).css('color','orange')
});
//$('.ms-acal-item').hover(function(){
// $(this).css("background-color", "yellow");
// alert($(this));
//});
});
</script>
No comments:
Post a Comment