2014-08-29 247 views
1

我使用的是引導日曆從http://bootstrap-calendar.eivissapp.com/根據日期

問題引導日曆繪圖事件是該事件被填充每隔四天的展會名單上。我希望他們填寫各自的日期。

這是作爲json字符串傳遞給視圖的數組。

 
Array 
(

    [0] => Array 
     (
      [id] => 99 
      [title] => Testing 
      [class] => event-default 
      [url] => /admin/courses/32/lessons/99 
      [start] => 1408589100 
      [end] => 1408590900 
     ) 

    [1] => Array 
     (
      [id] => 100 
      [title] => rereer 
      [class] => event-default 
      [url] => /admin/courses/32/lessons/100 
      [start] => 1408592760 
      [end] => 1408599960 
     ) 
) 

這裏是日曆圖像:

enter image description here

所有事件放置在每個日期。我需要把它們放在各自的日期。

關於如何使這項工作的任何建議?

回答

1

只需追加三個零(或由1000相乘)到每個[開始]和[結束]時間戳以使陣列看起來像這樣:

Array 
(

    [0] => Array 
     (
      [id] => 99 
      [title] => Testing 
      [class] => event-default 
      [url] => /admin/courses/32/lessons/99 
      [start] => 1408589100000 
      [end] => 1408590900000 
     ) 

    [1] => Array 
     (
      [id] => 100 
      [title] => rereer 
      [class] => event-default 
      [url] => /admin/courses/32/lessons/100 
      [start] => 1408592760000 
      [end] => 1408599960000 
     ) 
)