fullcalendar: events NOT shown in Weeks view

what I'm possibly doing wrong!?

I do NOT see my events in 'week/day' view when " defaultView: 'agendaWeek/agendaDay' ",

BUT: when clicking the 'month' view ALL is shown correctly in 'month' view! Then, when again clicking 'week/day' I see them ALL correctly also in 'week/day' view!

must miss a stupid thing - thanks for your time and hints ed

PS: this is a 'fullCalendar' implementation in Orchard CMS. As said ALL works fine except - when 'defaultView: agendaWeek' -> no events are shown! However, in 'month' view all my events show correctly; ALSO, when changing to 'Month' view than back to 'weeks' view - weeks view shows them ALL as well.

Because this is implemented in Orchard I wouldn't know how to do that in fiddle. BUT, because the events are shown I still think/hope that I do something wrong ....! thanks again oops forgot: fullcalendar: 3.6.1 datetimepicker: 2.5.4

<script type="text/javascript">
        (function ($) {
@if (Model.tagColorsEnabled && Model.tagColors != null) {
    <text>
            var tagSet = [
                @foreach (var tc in Model.tagColors)
                {
                    @Display(tc)
                }
            ];

            var tagIndex = [];
            for (var tag in tagSet) {
                tagIndex[tagSet[tag].slug] = tag;
            }

    </text>
}
            $('#calendar').fullCalendar({
                locale: '@culture',
                timeFormat: 'HH:mm',   //eddie  timeFormat: 'HH:mm{-HH:mm}',
                slotLabelFormat: 'HH:mm',   //eddie  timeFormat: 'HH:mm{-HH:mm}',
                height: 500,
                // height: 500, //added by eddie
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                    //  right: 'month,agendaWeek,agendaDay'  // eddie
                },
                eventRender: function (event, element) {
                    var colors = { bg : event.defaultBackgroundColor, br: event.defaultBorderColor, fg: event.defaultTextColor };
@if (Model.tagColorsEnabled)
{
    <text>
                    var min = 100;
                    for (var klassNdx in event.className) {
                        var klass = event.className[klassNdx];
                        if (klass.substring(0, 4) === "tag-") {
                            var entry = tagIndex[klass.substring(4)];
                            if (entry !== undefined) {
                                if (entry < min) {
                                    colors = tagSet[entry];
                                    min = entry;
                                }
                            }
                        }
                    }
    </text>
}
                    $(element)
                        .css("background-color", colors.bg)
                        .css("color", colors.fg)
                        .css("border-color", colors.br);
                },
                editable: false,
                events: {
                    url: '@Url.Content("~/_Calendar/" + Model.queryId)',
                },
                defaultView: '@Model.defaultView',
                weekends: @Model.showWeekends
                //viewRender: function (v, e) { alert("Rendering view"); }
                });
        })(jQuery);
    </script>

some more tests show:

when using as the 'defaultView: 'basicWeek' (instead of 'agendaWeek')I see ALL my events.

Well, I think, I need to further dig into fullcalendar? any hints are appreciated, ed

链接地址: http://www.djcxy.com/p/81230.html

上一篇: agendaweek:事件未显示

下一篇: fullcalendar:事件不在周视图中显示