到目前为止,我一直对FullCalendar的灵活性感到惊讶,但以下两个元素让我卡住了;如何在日历视图和自定义标题中标记“当前时间”
有没有什么办法,使在日视图,它里面列出小时加粗显示当前时间,没有太多的两轮牛车?
是否有任何方法来更改日历元素的标题,到目前为止它只占用占位符“变量”,用月份名称或类似名称替换,但我希望能够指定我自己的标题他们(这是很容易把它加在元件上完成的,但如果是可以将其内,那么,为什么不加吧?)
到目前为止,我一直对FullCalendar的灵活性感到惊讶,但以下两个元素让我卡住了;如何在日历视图和自定义标题中标记“当前时间”
有没有什么办法,使在日视图,它里面列出小时加粗显示当前时间,没有太多的两轮牛车?
是否有任何方法来更改日历元素的标题,到目前为止它只占用占位符“变量”,用月份名称或类似名称替换,但我希望能够指定我自己的标题他们(这是很容易把它加在元件上完成的,但如果是可以将其内,那么,为什么不加吧?)
#1议程一天视图我看到这个代码
<tr class="fc-slot22 ">
<th class="fc-agenda-axis fc-widget-header">11am</th>
<td class="fc-widget-content"><div style="position:relative"> </div></td>
</tr>
<tr class="fc-slot23 fc-minor">
<th class="fc-agenda-axis fc-widget-header"> </th>
<td class="fc-widget-content"><div style="position:relative"> </div></td>
</tr>
<tr class="fc-slot24 ">
<th class="fc-agenda-axis fc-widget-header">12pm</th>
<td class="fc-widget-content"><div style="position:relative"> </div></td>
</tr>
所以我们需要看看THs:
var nowHours = new Date().getHours();
var hourAMPM = (nowHours>12)?(nowHours-12)+"pm":nowHours+"am";
if (nowHours===12) hourAMPM ="12pm";
$("th").removeClass("nowtime");
$("th").contains(hourAMPM).addClass("nowtime");
#1至大胆日历当天变化
.fc-state-highlight {
background: none repeat scroll 0 0 #FFFFCC;
}
到
.fc-state-highlight {
background: none repeat scroll 0 0 #FFFFCC;
font-weight: bold;
}
#2你可以改变
<span class="fc-header-title">
<h2>April·2011</h2>
</span>
到任何你想要的后创建日历
对于#1,仅在今天查看时间的粗体显示时间,还是粗体显示,无论哪一天?你的意思是“基本日”视图,“议程日”视图还是两者? – 2011-04-13 13:56:02