Giter Club home page Giter Club logo

react-waterfall-calendar's Introduction

react-waterfall-calendar

Greenkeeper badge Build Status Coverage Status npm version Total downloads PRs Welcome MIT Licence

DEMO Branch

Props

    <Calendar
      interval

      selectType
      classNames
      dataAttribute
      defaultSelected

      dateFormat
      monthFormat

      enableTouchTap
      onClick
    />

interval

日历显示的月份区间

    const { from, to, months } = interval;
{ from, to }

格式为符合 ISO 8601String 类型

{ months }

格式为大于0的 Number 类型,{ from }undefined 时从当前月份开始计算

⚠️months !== undefined时,to将不起任何作用

selectType

日期选择类型

格式为 String 类型,接受以下三个值,默认为 'SINGLE'

'INTERVAL'

被选中的日期 是前后选择的两次日期间的所有日期

'MULTIPLE'

所有被选中的日期都会同时存在

'SINGLE'

只有最后一个被选择的日期

classNames

传入自定义样式的样式名

    const { calendar, month, horizontal, date } = classNames;

dataAttribute

可对个别日期单独设置 data-* 属性

    const dataAttribute = {};
    dataAttribute['2017-04-05'] = { attribute: 'attribute' }

defaultSelected

默认选中的日期

    const defaultSelected = ['2017-02-06', '2017-02-07'];

dateFormat

日期显示格式

默认为 'D'

    const dateFormat = 'D' || 'DD' || 'D日';

monthFormat

月份标题格式

默认为 'YYYY-MM'

    const dateFormat = 'M' || 'MM' || 'M月';

onClick

点击日期时触发的回调方法

    function onClick({ date, event, nextSelected, state }) {}

调用 onClick 后的返回值

false [boolean]

被选中的日期不会更新为 nextSelected 中的内容

{ nextSelected } [Array]

会根据 onClick 返回的 nextSelected 值更新 nextSelected符合 ISO 8601String 类型数组

enableTouchTap

enableTouchTap = true 时,onClick回调事件为 onTouchTap

默认为 false

react-waterfall-calendar's People

Contributors

greenkeeper[bot] avatar runju avatar runjuu avatar runjuuu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-waterfall-calendar's Issues

An in-range update of eslint-plugin-react is breaking the build 🚨

The devDependency eslint-plugin-react was updated from 7.12.1 to 7.12.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v7.12.2

Fixed

Commits

The new version differs by 5 commits.

  • c93cbc6 Update CHANGELOG and bump version
  • e71feb5 [Fix] forbid-prop-types: fix crash with propWrapper check on MemberExpressions
  • 11a66c0 Merge pull request #2103 from yoyo837/patch-1
  • e9cfc16 Link does not end with '.'
  • 4da90ea [Fix] prop-types: avoid crash on used prevProps

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of browser-env is breaking the build 🚨

The devDependency browser-env was updated from 3.2.5 to 3.2.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

browser-env is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.