agendaWeek: events not shown

what I'm possibly doing wrong!?

I do NOT see my events when 'defaultView: agendaWeek' (or agendaDay). PS: basicWeek (or basicDay) works just fine.

BUT: when clicking the 'month' view: ALL events are showing correctly in 'month' view! Then, when again clicking 'week' (or Day) I see them ALL correctly as agendaWeek (or agendaDay) view!

I'm running fullcalendar: 3.6.2

PS: sorry, posted same issue in non-related forum

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

 <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, //added by eddie
                // allDay: false,   // 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',
                // defaultView: 'basicWeek',
                defaultView: 'agendaWeek',
                weekends: @Model.showWeekends
                //viewRender: function (v, e) { alert("Rendering view"); }
                });
        })(jQuery);
    </script>

solved - sort of!

When using 'defaultView: basicWeek / agendaWeek'; fact is that I get different DateTime info like:

basicWeek: '2017-1-06' --> which in turn works correctly!

agendaWeek: '2017-1-06T00:00:00' --> which results in an error!

When stripping off 'T00:.....' --> problem solved I know that this is probably not the 'clean' solution BUT for the time being ..... will further check if time is available! For now I like to thank ADyson for his advise and time spent.

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

上一篇: FullCalendar显示本周事件下的最后几周事件

下一篇: agendaweek:事件未显示