Changing the format of the day title in weekview

倖福魔咒の 提交于 2019-12-23 12:13:55

问题


How can I change the formatting of the date in Fullcalendar -> weekview.
It now says:

Sun 7/24  Mon 7/25  Tue 7/26  Wed 7/27 Thu 7/28 Fri 7/29  Sat 7/30

I want to switch month and day around so it says

Sun 24/7  Mon 25/7  Tue 26/7 Wed 27/7 Thu 28/7 Fri 29/7  Sat 30/7  

which is the way our users are used to in the country where I live/work.


回答1:


I have found a solution:

columnFormat: {
    month: 'ddd',
    week: 'ddd d/M',
    day: 'dddd d/M'
},



回答2:


There is a mistake, the first character must be lowercase:

columnFormat: { month: 'ddd', week: 'ddd d/M', day: 'dddd d/M' },




回答3:


try this then..

$('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,basicWeek,basicDay'
            },
            defaultView: 'basicWeek',
            editable: true,
            events: [
                {
                    title: 'All Day Event',
                    start: new Date(y, m, 1) // change the format here.
                },
                {
                    title: 'Long Event',
                    start: new Date(y, m, d-5),
                    end: new Date(y, m, d-2)
                }


来源:https://stackoverflow.com/questions/6872429/changing-the-format-of-the-day-title-in-weekview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!