npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wink-react-calendar

v0.1.3

Published

Yet another calendar React component

Downloads

6

Readme

WiNK React Calendar

Yet another calendar React component

wink developer npm

Why should I use it?

  • Get things done quickly with singleSelection and rangeSelection modes ✅
  • Or do your own thing with custom mode and get creative 🎨
  • Calendar events? We've got you covered
  • Responsive and mobile first 📱
  • Continously updated 🔥
  • Layout built with the flexible CSS Grid
  • Built on top of the modern and lightweight Luxon

Demos

Check out the demos here!

Get Started

$ npm i wink-react-calendar

Usage

  1. Import the css module
import 'wink-react-calendar/dist/css/style.css';
  1. Import and use the component
import { CalendarMonth } from 'wink-react-calendar';

...

const [date, setDate] = useState();

...

<CalendarMonth
  mode='singleSelection'
  selectedDate={date}
  onCellClick={setDate}
/>

Props

CalendarMonth

| Name | Type | Default | Description | --- | --- | --- | --- | | mode | 'singleSelection' | 'rangeSelection' | 'custom' | undefined | Define the mode of the calendar | currentMonth | Timestamp | Current month | Current month visualized on the calendar | | className | string | undefined | Custom class for the outer container | | weekDaysExceptions | WeekDay[] | [] | Weekdays to exclude from being rendered | | cellsConfig | BaseCalendarMonthCellConfig[] | [] | Custom config for any cell based on date | | minDate | Timestamp | undefined | Disable any cell which date is before this param | | maxDate | Timestamp | undefined | Disable any cell which date is after this param | | weeks | number | 6 | Number of weeks to be rendered at the same time | | opaqueExtraMonthCells | boolean | true | Render cells which date doesn't belong to current month with a opaque style | | borderCurrentDay | boolean | true | Render current day with a bordered style | | navigateToCorrespondingMonth | boolean | true | Navigate to the corresponding month of a cell which date doesn't belong to current month | | showWeekDaysLabels | boolean | true | Show weekdays labels on top | | onCellClick | (date: Timestamp) => void | undefined | Triggered when a cell is clicked | | onMonthChange | (date: Timestamp) => void | undefined | Triggered when the current month is changed | | selectedDate | Timestamp | undefined | (singleSelection mode only) The current selected day which by default is shown with an active style | | startDate | Timestamp | undefined | (rangeSelection mode only) Starting date of the range | | endDate | Timestamp | undefined | (rangeSelection mode only) Ending date of the range | | onSelectStartDate | (date?: Timestamp) => void | undefined | (rangeSelection mode only) Triggered when first date is selected | | onSelectEndDate | (date?: Timestamp) => void | undefined | (rangeSelection mode only) Triggered when second date is selected |

Typescript support

The package comes with types included