FullCalendar不显示某个日期 [英] FullCalendar doesn't display certain date

查看:648
本文介绍了FullCalendar不显示某个日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $('#calendar')使用fullCalendar并设置可视化结构如下: ).fullCalendar({
'defaultView':'agendaWeek',
'height':BackendCalendar.getCalendarHeight(),
'editable':true,
'firstDay':1 ,//Lunedì
'slotMinutes':30,
'snapMinutes':15,
'axisFormat':'HH:mm',
'timeFormat':'HH:mm { - HH:mm}',
'allDayText':EALang ['all_day'],
'columnFormat':
{
'month':'ddd',
'week':'ddd d / M',
'day':'dddd d / M'
},
'titleFormat':
{
'month':'MMMM yyyy',
'week':'MMMM d [yyyy] {'—'[MMM] d,yyyy},
'day':'dddd ,MMMM d,yyyy'
},
'header':{
'left':'prev,next today',
'center':'title',
'right':'agendaDay,agendaWeek ,月'
},

问题是,当我加载页面标题显示为不良:



显示月份



每周显示



每日展示

< a href =https://i.stack.imgur.com/iy0dB.jpg =nofollow noreferrer>



我做错了什么?我使用的是2.3.1版,过去我使用的是vesion 1.6.1,因为easyappointment库有一个旧版本。现在我已经更新了版本,全部都坏了,为什么?我需要perphaps来更新一些文件,方法吗?

解决方案

必须是大写 Y

 'month':'MMMM YYYY',

请看这里: http:// fullcalendar。 io / docs / text / titleFormat /

时间格式根据moment.js: http://www.momentjs.com



我在这里编译了一个工作小提琴: http://jsfiddle.net/fq7zwjq0/



主要变化: p>

字符串MMMM d [yyyy] {'&#8212;'[MMM] d,yyyy},是定义干扰的时刻,因为目的不明确,我删除了内部。

语言格式可以通过' lang':'fr'



大写或小写字母都太简单了,占位符是区分大小写的标记,必须根据这里的moment.js文档进行设置: http://momentjs.com/docs/#/displaying/


I'm using fullCalendar and I've set the structure of visualization like this:

    $('#calendar').fullCalendar({
        'defaultView': 'agendaWeek',
        'height': BackendCalendar.getCalendarHeight(),
        'editable': true,
        'firstDay': 1,      //Lunedì
        'slotMinutes': 30,
        'snapMinutes': 15,
        'axisFormat': 'HH:mm',
        'timeFormat': 'HH:mm{ - HH:mm}',
        'allDayText': EALang['all_day'], 
        'columnFormat': 
        {
            'month': 'ddd',
            'week': 'ddd d/M',
            'day': 'dddd d/M'
        },
        'titleFormat': 
        {
            'month': 'MMMM yyyy',
            'week': "MMMM d[ yyyy]{ '&#8212;'[ MMM] d, yyyy}",
            'day': 'dddd, MMMM d, yyyy'
        },
        'header': {
            'left': 'prev,next today',
            'center': 'title',
            'right': 'agendaDay,agendaWeek,month'
        },

the problem's that when I load the page the date on the header is displayed bad:

Display for month

Display for week

Display for day

What am I doing wrong? I'm using the version 2.3.1, in the past I'm using the vesion 1.6.1 'cause easyappointment library have an old version. Now I've update the version and all is broken, why? I need perphaps to update some file, method?

解决方案

Must be capital Y:

'month': 'MMMM YYYY',

look here: http://fullcalendar.io/docs/text/titleFormat/

The time formats are according to moment.js: http://www.momentjs.com

I have compiled a working fiddle here: http://jsfiddle.net/fq7zwjq0/

Major changes:

The string "MMMM d[ yyyy]{ '&#8212;'[ MMM] d, yyyy}", is definetively disturbing moment and as the purpose isn't clear, I ave deleted the inner.

The language formatting can be easily set by 'lang': 'fr'

And make either everything uppercase or everything lowercase is way too simple, the placeholders are case sensitive tokens and mustbe set according to the moment.js documentation here: http://momentjs.com/docs/#/displaying/

这篇关于FullCalendar不显示某个日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆