到目前爲止,我一直對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