reactjs - fullcalendar how to remove 00 uhr in header? - Stack Overflow

how can I remove the 00 Uhr everytime in the header ?code:<FullCalendarref={ref}resources={res}viewC

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 badges
Add a comment  | 

1 Answer 1

Reset to default 2

The 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744628808a4584735.html

相关推荐

  • reactjs - fullcalendar how to remove 00 uhr in header? - Stack Overflow

    how can I remove the 00 Uhr everytime in the header ?code:<FullCalendarref={ref}resources={res}viewC

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信