我正在使用完整日歷插件 - 版本 3.9.0 在 larvel 專案上集成日歷。( https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.js )
我日歷中的月視圖如下所示:
在此處輸入圖片說明
到目前為止一切順利,但正如您所見,“am”和“pm”有縮寫“a”和“p”。因為我正在開發一個德國專案,所以我想使用格式 HH:mm 沒有“a”和“p”。
我的代碼看起來像:
firstDay: 1,
firstHour: 0,
slotMinutes: 15,
slotLabelFormat: ['HH:mm'],
axisFormat: 'HH:mm',
views: {
month: {
columnFormat: 'ddd' // set format for month here
},
week: {
columnFormat: 'D.M.', // set format for week here
titleFormat: 'D. MMMM YYYY'
},
day: {
columnFormat: 'd.M.Y', // set format for day here
titleFormat: 'D. MMMM YYYY'
}
},
displayEventTime: true,
events: '/full-calendar',
selectable:false,
selectHelper: true,
droppable: false,
怎么了?
uj5u.com熱心網友回復:
您可以使用屬性 timeFormat:
$('#calendar').fullCalendar({
events: [
{
title: 'My Event',
start: '2010-01-01T14:30:00',
allDay: false
}
// other events here...
],
timeFormat: 'H(:mm)' // uppercase H for 24-hour clock
});
參考:https : //fullcalendar.io/docs/v3/timeFormat
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/363785.html
上一篇:如何在Jquery中獲取yii2單擊的radioList值?
下一篇:選擇復選框時保存行值
