@svpkg/calendarly
v0.0.3
Published
A sleek, dependency-free React calendar with Tailwind styling, date range selection, and quick presets. ππ
Readme
π§ Package Under Progress π§
π
@svpkg/calendarly β A Simple & Flexible React Calendar Component
@svpkg/calendarly is a lightweight, customizable calendar component built with React, Day.js, and CSS. It provides both single-date and date-range selection with an intuitive UI.
β¨ Features
β
Single and multiple-month view
β
Quick selection options (Today, Yesterday, This Week, etc.)
β
Single-date and date-range selection
β
Minimal dependencies (React + Day.js)
β
Fully customizable
π Installation
npm install @svpkg/calendarlyor
yarn add @svpkg/calendarlyπ οΈ Usage
Basic Example
import { Calendarly } from "@svpkg/calendarly";
<Calendarly
type="single"
isRange={false}
quickSelection={true}
onSelect={(date) => console.log("Selected date:", date)}
/>Props
| Prop | Type | Description |
|-----------------|----------|-------------|
| type | "single" | "multiple" | "single" shows one month, "multiple" shows two months side by side. |
| isRange | boolean | If true, enables date range selection. If false, allows single date selection. |
| quickSelection | boolean | If true, displays quick selection options like Today, This Week, etc. |
| onSelect | (date: string \| [string, string]) => void | Callback function triggered on date selection. Returns either a single date or a date range. |
π Example Use Cases
1οΈβ£ Single-Date Picker
<Calendarly
type="single"
isRange={false}
quickSelection={false}
onSelect={(date) => console.log("Selected:", date)}
/>
π Date-Range Picker
<Calendarly
type="multiple"
isRange={true}
quickSelection={true}
onSelect={(range) => console.log("Selected Range:", range)}
/>π₯ Why Use @svpkg/calendarly?
β No external calendar packages β pure React & Day.js
β Simple, minimal UI with easy customization
β Quick date selection options for faster input
π License
MIT License. Feel free to use
Enjoy using @svpkg/calendarly? π Star the repo on github and share your feedback! π

