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

react-scroll-calendar

v1.0.0

Published

A simple and reusable calendar component for React

Downloads

205

Readme

React Scroll Calendar

npm version downloads license Total alerts Language grade: JavaScript

A simple and reusable Scrollable-Calendar component for React (Demo)

Features

  • Scroll – Just keep scrolling', just keep scrollin'
  • Flexible – Min/max date and selcted date.
  • Customizeable – Customize and theme to your heart's content.
  • Events and callbacks – onSelect.
  • Mobile-friendly – Silky smooth scrolling on mobile

Getting Started

Using npm:

npm install react-scroll-calendar --save

Usage

Basic Example

import React, { Component } from 'react';
import MobileCalendar from 'react-scroll-calendar';
import moment from 'moment';
import "react-scroll-calendar/build/react-scroll-calendar.css"; // only needs to be imported once

// Render the Calendar

render(
  <MobileCalendar
    minDate={moment('2019-01-14', 'YYYY-MM-DD')}
    selectedDate={moment('2019-01-23', 'YYYY-MM-DD')}
    maxDate={moment('2019-10-14', 'YYYY-MM-DD')}
    />,
  document.getElementById('root')
);

Prop Types

| Property | Type | Default | Description |
|:---------------------|:---------|:-----------------------|:--------------------------------------------------------------| | minDate | moment | moment().add(1, 'd') | The minimum date that is selectable. | | maxDate | moment | moment().add(9, 'M') | The maximum date that is selectable. | | selectedDate | moment | null | The selected date of the calendar. | | className | String | null | Optional CSS class name to append to the root element. |
| onSelect | Function | | Callback invoked after select() returns the current selected. | | monthFormat | String | MMMM | Label format for the month tile. | | yearFormat | String | YYYY | Label format for the year tile. | | enableYearTitle | Boolean | true | Option to enable / disable the year in header. | | enableMonthTitle | Boolean | true | Option to enable / disable the month in header. |

Compatibility

React

We're always trying to stay compatible with the latest version of React.

Moment.js

Currently we are using Moment.js. In future we will switch to native Date objects to reduce the size of the package. Please see the example for moment.js.

Browser Support

The date picker is compatible with the latest versions of Chrome, Firefox, and IE10+.

Unfortunately, it is difficult to support legacy browsers while maintaining our ability to develop new features in the future. For IE9 support, it is known that the classlist polyfill is needed, but this may change or break at any point in the future.

Reporting Issues

If you find an issue, please report it along with any relevant details to reproduce it. The easiest way to do so is to fork this sandbox on CodeSandbox.

License

react-scroll-calendar is available under the MIT License.