Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
550 views
in Technique[技术] by (71.8m points)

javascript - (Fullcalendar 4 VueJS)-行时间格式从AM / PM到24H((Fullcalendar 4 VueJS) - Row time format from AM/PM to 24H)

I use Fullcalendar component for VueJs .

(我对VueJs使用Fullcalendar组件。)

I need to setup 24hours format for all, for events and rows title.

(我需要为所有事件和行标题设置24hours格式。)

For events I found how to do that:

(对于事件,我发现了如何做到这一点:)

:eventTimeFormat="{
   hour: '2-digit',
   minute: '2-digit',
   hour12: false
}"

But for row title I can't.

(但是对于行标题,我不能。)

在此处输入图片说明

Please give your advice.

(请提出您的建议。)

  ask by Denys translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For this you can use the slotLabelFormat option.

(为此,您可以使用slotLabelFormat选项。)

For example, this will produce an hours/minutes display in 24hr format, like 23:45 etc:

(例如,这将以24小时格式显示小时/分钟,例如23:45等:)

:slotLabelFormat="{ 'hour12': false, 'hour': '2-digit', 'minute': '2-digit'}"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...