0.4.0 • Published 3 years ago

react-calendar-toolkit v0.4.0

Weekly downloads
47
License
MIT
Repository
github
Last release
3 years ago

Build Status codecov npm version npm types included types included

React calendar toolkit

Datepicker screenshot

Description

react-calendar-toolkit (RCT) is a set of React Components capable of rendering various calendars, datepickers etc.

Documentation

Demo

Motivation

There are many good datepickers on the market. Unfortunately, most of them are style-opinionated, so if you like logic of chosen datepicker, you are subscribing to the visual style of it. But your website or application style may be completely different. With RCT you don't have hack third-party CSS, you can write your own styled UI components and RCT will render them.

Features

  • Use your custom UI components to change look and feel to match your visual style.
  • Has default theme in Material Design style.
  • Uses date-fns as logic provider.
  • Supports localization for 69 languages, using date-fns locales. You can create custom one.
  • Lightweight: adds just ~10kb to your bundle.
  • Typescript friendly, type definitions included.
  • Disable any date:
    disableDate: ({isWeekend, precision, date}) => Boolean
  • Highlight any date:
    highlightDate: ({isWeekend, precision, date}) => Boolean
  • Highlight weekends:
    highlightWeekends: Boolean

Browsers support

IE / EdgeFirefoxChromeSafariiOS Safari
IE11*, Edgelast 2 versions, ESRlast 2 versionslast 2 versionslast 2 versions

/* needs polyfills, see docs

Quickstart

yarn add react-calendar-toolkit date-fns@2

Then use it like this:

import React from 'react';
import Datepicker from 'react-calendar-toolkit'; // datepicker component
import 'react-calendar-toolkit/lib/style/default.css'; // styles

const Component = () => (
  <div>
    <Datepicker onDateSet={date => {console.log('date set', date)}} />
  </div>
);

export default Component;

Development

Available scripts

  • start - starts application in development mode;
  • start:docs - starts Docz;
  • build:docs - builds Docz;
  • build:lib - builds package;
  • lint:js - runs eslint;
  • fix:js - runs eslint with fix option enabled;
  • test - runs tests.
  • lint:style: runs stylelint;
  • fix:style: runs stylelint with fix option enabled.
0.4.0

3 years ago

0.3.15

4 years ago

0.4.0-beta.7

4 years ago

0.4.0-beta.6

4 years ago

0.4.0-beta.5

4 years ago

0.4.0-beta.3

4 years ago

0.4.0-beta.2

4 years ago

0.4.0-beta.1

4 years ago

0.4.0-beta.0

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.16

4 years ago

0.2.15

4 years ago

0.2.14

4 years ago

0.2.13

4 years ago

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago