fullcalendar-timeline-infinite-scroll-wrapper
v1.0.13
Published
React library support infinite scroll to fullcalendar resource timeline
Downloads
9
Maintainers
Readme
Fullcalendar-timeline-infinite-scroll-wrapper
This react library support infinite scrolling to Fullcalendar resource timeline in month view.
Installation
The package can be installed via npm:
npm install fullcalendar-timeline-infinite-scroll-wrapper --save
Or via yarn:
yarn add fullcalendar-timeline-infinite-scroll-wrapper
You will need to use with Fullcalendar react and plugins @fullcalendar/resource-timeline
Demo
Usage
Example code:
<FullCalendarInfiniteScrollWrapper
scrollOptions={{slotMinWidth: 80}}
onChangeCalendar={onChangeCalendar}
firstLoad={handleFirstLoad}
>
{({ref, numberDisplayDaysOfCalendar, moveToDate, onMoveDirection}) => (
<>
<button onClick={() => onMoveDirection("next")}>next</button>
<button onClick={() => onMoveDirection("today")}>today</button>
<button onClick={() => onMoveDirection("prev")}>prev</button>
<FullCalendar
ref={ref}
schedulerLicenseKey="GPL-My-Project-Is-Open-Source"
initialView="resourceTimelineMonthCustom"
plugins={[resourceTimelinePlugin, interactionPlugin]}
views={{
resourceTimelineMonthCustom: {
type: "resourceTimeline",
duration: {
days: numberDisplayDaysOfCalendar || 30
}
}
}}
headerToolbar={{
left: "",
center: "",
right: ""
}}
scrollTime={{days: 15}}
scrollTimeReset={false}
selectable
height="auto"
resourceOrder="false"
slotMinWidth={80}
resourceAreaHeaderContent="Rooms"
resources="https://fullcalendar.io/api/demo-feeds/resources.json"
events="https://fullcalendar.io/api/demo-feeds/events.json?single-day&for-resource-timeline"
/>
</>
)}
</FullCalendarInfiniteScrollWrapper>
You can view full code at here
Contribution
Open an issue and your problem will be solved.