如何在同一页面上显示一个月以上

时间:2016-07-13 10:03:07

标签: javascript jquery html css

我正在使用fullCalendar插件。 在这里,如何在同一页面上显示2个月或更长时间。请看下面的图片。我想要它在图像中的确切位置。

Image

在这张照片中,7月和8月的月份正在同时显示。我希望使用完整的日历插件这样做。请帮帮我怎么做?

jsfiddle

这里我添加了完整的日历示例小提琴。这里只有一只飞蛾。我想默认3个月而不点击上一个或下一个按钮。



$(document).ready(function() {

    var date = new Date();
    var d = date.getDate();
    var m = date.getMonth();
    var y = date.getFullYear();

    var events_array = [
        {
        title: 'Test1',
        start: new Date(2012, 8, 20),
        tip: 'Personal tip 1'},
    {
        title: 'Test2',
        start: new Date(2012, 8, 21),
        tip: 'Personal tip 2'}
    ];

    $('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        selectable: true,
        events: events_array,
        eventRender: function(event, element) {
            element.attr('title', event.tip);
        }
    });
});

<div style="border:solid 2px red;">
        <div id='calendar'></div>
</div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

添加多个calander ..

 E/ActionVeLoggingWorker(24604): Could not upload actions VE logging
 E/ActionVeLoggingWorker(24604): com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 262160
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.shared.io.a.b(AbstractLogEntry.java:130)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.search.core.k.d.a(AsyncHttpEngine.java:117)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.search.core.k.d$1.call(AsyncHttpEngine.java:2047)
 E/ActionVeLoggingWorker(24604):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.search.core.k.z$1.run(TaskRunnerScheduledExecutor.java:41)
 E/ActionVeLoggingWorker(24604):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
 E/ActionVeLoggingWorker(24604):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.shared.util.concurrent.a.af.run(TaskRunnerFutureTask.java:122)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.shared.util.concurrent.a.aq.run(ThrottlingExecutor.java:139)
 E/ActionVeLoggingWorker(24604):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
 E/ActionVeLoggingWorker(24604):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
 E/ActionVeLoggingWorker(24604):    at java.lang.Thread.run(Thread.java:761)
 E/ActionVeLoggingWorker(24604):    at com.google.android.apps.gsa.shared.util.concurrent.a.aa$1.run(GsaThreadFactory.java:104)

将第二个日历日期设置为下个月,如此

  <div id='calendar'></div>
  <div id='calendar1'></div>