[英]How can I override defaults in jQuery Fullcalendar
I use Fullcalendar on my site, but I need all text in different language. 我在我的网站上使用Fullcalendar ,但我需要使用不同语言的所有文本。 There is piece of code in that plugin: 该插件中有一段代码:
// function for adding/overriding defaults
var setDefaults = fc.setDefaults = function(d) {
$.extend(true, defaults, d);
};
But I have no ideas how I can use it. 但我不知道如何使用它。 Please, I need help. 拜托,我需要帮助。
You just override the settings when creating the fullcalendar. 您只需在创建fullcalendar时覆盖设置。 Like this: 像这样:
var options = {
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
timeFormat: {
agenda: 'h(:mm)t{ - h(:mm)t}',
'': 'h(:mm)t{-h(:mm)t }'
},
monthNames: ["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" ],
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
dayNames: [ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
dayNamesShort: ['Dom','Lun','Mar','Mié','Jue','Vie','Sáb'],
buttonText: {
today: 'hoy',
month: 'mes',
week: 'semana',
day: 'día'
}
};
$('#calendar').fullCalendar(options);
The properties for this kind of thing are documented here: 这种事物的属性记录在这里:
http://arshaw.com/fullcalendar/docs/text/ http://arshaw.com/fullcalendar/docs/text/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.