admin管理员组文章数量:1395780
how can I remove the 00 Uhr everytime in the header ?
code:
<FullCalendar
ref={ref}
resources={res}
viewClassNames='zd'
scrollTime={milliseconds - 86400000}
// @ts-ignore
events={query}
schedulerLicenseKey="0487410008-fcs-16832974662"
plugins={[ resourceTimelinePlugin, interactionPlugin, dayGrid, scrollGrid ]}
initialView='resourceTimelineYear'
allDayContent={(el) => console.log(el)}
views={{
resourceTimelineYear: {
duration: {
years: 2
},
slotDuration: { hours: 24 },
},
}}
locale='de'
/>
if I remove slotduration hours 24 then it shows only the months
how can I remove the 00 Uhr everytime in the header ?
code:
<FullCalendar
ref={ref}
resources={res}
viewClassNames='zd'
scrollTime={milliseconds - 86400000}
// @ts-ignore
events={query}
schedulerLicenseKey="0487410008-fcs-16832974662"
plugins={[ resourceTimelinePlugin, interactionPlugin, dayGrid, scrollGrid ]}
initialView='resourceTimelineYear'
allDayContent={(el) => console.log(el)}
views={{
resourceTimelineYear: {
duration: {
years: 2
},
slotDuration: { hours: 24 },
},
}}
locale='de'
/>
if I remove slotduration hours 24 then it shows only the months
Share Improve this question asked Mar 14 at 23:12 oemer okoemer ok 611 silver badge5 bronze badges1 Answer
Reset to default 2The time slots including midnight values due to slotDuration: { hours: 24 }
and since you are viewing it in day slots those values are showing in the header. You can either change the slotDuration: { day: 1 }
or change the slotLabelContent
like below.
To override the slotLabelContent:
const slotLabelContent = (arg) => {
return `${arg.text}`;
};
<FullCalendar
...
slotLabelContent={slotLabelContent}
...
/>
Note: I just print the text of the arg, you can use whatever logic there.
本文标签: reactjsfullcalendar how to remove 00 uhr in headerStack Overflow
版权声明:本文标题:reactjs - fullcalendar how to remove 00 uhr in header? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744628807a2616415.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论