Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 更改fullCalendar resourceTimeGridDay视图行高_Css_Reactjs_Fullcalendar_Fullcalendar Scheduler_Fullcalendar 5 - Fatal编程技术网

Css 更改fullCalendar resourceTimeGridDay视图行高

Css 更改fullCalendar resourceTimeGridDay视图行高,css,reactjs,fullcalendar,fullcalendar-scheduler,fullcalendar-5,Css,Reactjs,Fullcalendar,Fullcalendar Scheduler,Fullcalendar 5,我已经将fullcalendar集成到我的react项目中,如果我更改slotMinTime和slotMaxTime属性,该行的高度将更改。如果我减少显示时间,每个插槽的大小就会变大,而我无法将其恢复到实际大小。我使用过contentHeight和aspectRatio,但它们似乎也不起作用。请帮忙 <FullCalendar schedulerLicenseKey="CC-Attribution-NonCommercial-NoDerivatives"

我已经将fullcalendar集成到我的react项目中,如果我更改slotMinTime和slotMaxTime属性,该行的高度将更改。如果我减少显示时间,每个插槽的大小就会变大,而我无法将其恢复到实际大小。我使用过contentHeight和aspectRatio,但它们似乎也不起作用。请帮忙

<FullCalendar
        schedulerLicenseKey="CC-Attribution-NonCommercial-NoDerivatives"
        ref={calendarRef}
        plugins={[
            momentTimezonePlugin,
            ScrollgridPlugin,
            resourceTimelinePlugin,
            resourceTimeGridPlugin,
            googleCalendarPlugin,
            interactionPlugin
        ]}
        timeZone="America/New_York"
        height="100%"
        // aspectRatio={5}
        droppable={true}
        headerToolbar={{
            left : '',
            center : '',
            right : ''
        }}
        dayMinWidth={250}
        nowIndicator={true}
        slotEventOverlap={false}
        slotDuration="00:15:00"
        slotMinTime="07:00:00"
        slotMaxTime="19:00:00"
        slotLabelInterval="00:15"
        slotLabelFormat={{
            hour : 'numeric',
            minute : '2-digit',
            hour12 : true
        }}
        initialView="resourceTimeGridDay"
        editable={true}
        eventResourceEditable={true}
        allDaySlot={false}
        selectable={true}
        selectMirror={true}
        dayMaxEvents={true}
        resources={resources}
        events={appointments}
        slotLabelContent={SlotComp}
        resourceLabelContent={data => RenderResourceContent(data, setActiveProviderView)
        }
        resourceOrder="title"
        weekends={true}
        eventContent={data => (
            <EventComp
                data={data}
                appointments={appointments}
                apiLoading={apiLoading}
                addAppointmentToUpdate={addAppointmentToUpdate}
                addAppointmentToDuplicate={addAppointmentToDuplicate}
                addBreakAppointment={addBreakAppointment}
                updateAppointmentStatus={updateAppointmentStatus}
                showRecurringLoadingNotification={
                    showRecurringLoadingNotification
                }
                appointmentDetailsToggle={appointmentDetailsToggle}
                getPatientDetails={getPatientDetails}
            />
        )}
        selectConstraint="businessHours"
        eventConstraint="businessHours"
        select={newEventSelected}
        eventDrop={eventDropped}
        eventResize={eventResizeStopped}
        eventChange={eventChanged}
    />
RenderResourceContent(数据,setActiveProviderView)
}
resourceOrder=“title”
周末={true}
eventContent={data=>(
)}
选择constraint=“营业时间”
eventConstraint=“营业时间”
select={newEventSelected}
eventDrop={eventDrop}
eventResize={eventResizeStopped}
eventChange={eventChanged}
/>
如果我不指定最小和最大时间,情况就是这样

在我指定之后


行高达到80px,否则仅为40px

如果我减少显示时间,则每个插槽的大小将变大
…不确定您的意思,我没有在fullCalendar中体验到这一点。您是否可以提供一些比较屏幕截图,以便我们了解您的意思,并准确显示您更改了哪些设置(以及在每种情况下您对这些设置使用了哪些值),以避免出现差异?谢谢。是的,当然,我已经编辑了这个问题。你可以查一下。感谢您的相关代码,我尝试重新创建场景(使用vanilla fullCalendar,我不知道如何反应,但底层功能是相同的),结果是:。压扁的日历似乎是高度:100%规则的结果。您是否有其他CSS和元素控制日历所在容器的高度?这对于这种情况可能很重要。如果我们删除高度:100%选项,日历看起来正常,插槽不会拉伸:。如果我们保持高度,并且还有一个任意大的固定高度容器来包装日历,那么插槽看起来也正常(尽管网格底部有一个大的空白区域):。简言之,我无法重现你的问题。我从截图中注意到,您似乎也在使用自定义主题。所以你的问题很可能是因为日历周围的容器和控制它的CSS,或者主题中的一些CSS,或者两者的组合。