@demark-pro/react-booking-calendar
v4.0.6
Published
A responsive customizable React Booking calendar with overbooking protection
Maintainers
Readme
React Booking Calendar
React Booking Calendar is a React library for monthly and scrollable booking calendars with built-in overbooking protection.
Documentation and examples: https://demark-pro.github.io/react-booking-calendar/
Installation
npm install @demark-pro/react-booking-calendarreact and react-dom are peer dependencies.
Quick Start
import { useState } from "react";
import { Calendar } from "@demark-pro/react-booking-calendar";
import "@demark-pro/react-booking-calendar/dist/react-booking-calendar.css";
export function BookingCalendar() {
const [selected, setSelected] = useState([null, null]);
return (
<Calendar
selected={selected}
reserved={[
{
startDate: new Date(2030, 4, 12, 14, 0),
endDate: new Date(2030, 4, 14, 10, 0),
},
]}
onChange={setSelected}
/>
);
}Exports
CalendarScrollableCalendargetProtectedTimegetProtectedInterval
For styling, custom components, and full API reference, use the documentation site: https://demark-pro.github.io/react-booking-calendar/
