why globalization in web.config makes fullcalendar not to render events

前端 未结 1 613
日久生厌
日久生厌 2020-12-22 02:16

This problem I am seeing is in mozilla, but works fine in IE

I have this in my _calendar.cshtml partial view on document.ready

$.aja         


        
相关标签:
1条回答
  • 2020-12-22 03:05

    Ok. After googling so much I found out answer for this.

    I just need to set date as below for the events:

     events: $.map(data, function (item, i) {
                        var event = new Object();
                        event.start = moment(item.StartDate).utc();
                        event.title = item.EventName;
                        event.brief = item.EventBrief;
                        return event;
                    }),
    

    This worked like a miracle. But I have to keep my web.config file as below

    <globalization culture="auto" uiCulture="auto"/>
    

    instead of <globalization culture="en-IN" uiCulture="en-IN"/>

    When I keep it as culture="en-IN" even though I convert date object using moment it will not work. Still figuring out why but for time being the above solution works out.

    0 讨论(0)
提交回复
热议问题