Socket
Socket
Sign inDemoInstall

rc-calendar

Package Overview
Dependencies
8
Maintainers
1
Versions
239
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-calendar

calendar ui component for react


Version published
Weekly downloads
120K
increased by5.77%
Maintainers
1
Install size
534 kB
Created
Weekly downloads
 

Changelog

Source

3.10.1 / 2015-07-02

add adjustOrientOnCalendarOverflow prop for picker

Readme

Source

rc-calendar


calendar ui component for react, port from https://github.com/modulex/date-picker

NPM version SPM version build status Test coverage gemnasium deps node version npm download Sauce Test Status

Sauce Test Status

Screenshots

Feature

  • support ie8,ie8+,chrome,firefox,safari
  • support date, month, year, decade select panel
  • support week number
  • support en-us and zh-cn locale (ui and timeOffset)
  • support aria and keyboard accessibility

Keyboard

  • Previous month (PageUp)
  • Next month (PageDown)
  • tab into hour input: Last hour(Up), Next hour(Down)
  • tab into hour input: Last minute(Up), Next minute(Down)
  • tab into hour input: Last second(Up), Next second(Down)
  • Last year (Control + left)
  • Next year (Control + right)

install

rc-calendar

Usage

var Calendar = require('rc-calendar');
var React = require('react');
React.render(<Calendar />, container);

Development

npm install
npm start

Example

http://localhost:8001/examples/

online example:

http://react-component.github.io/calendar/examples/index.html

API

Calendar props

nametypedefaultdescription
classNameStringadditional css class of root dom node
styleObjectadditional style of root dom node
value GregorianCalendar current value like input's value
defaultValueGregorianCalendardefaultValue like input's defaultValue
orientString[]affect the position of arrow. exp: ['left','top']
localeObjectrequire('rc-calendar/lib/locale/en-us')calendar locale
disabledDateFunction(current:GregorianCalendar):Booleannullwhether to disable select of current date
showWeekNumberBooleanfalsewhether to show week number of year
showTodayBooleantruewhether to show today button
showTimeBooleantruewhether to support time select
focusedBooleanfalsewhether to focus on render
onSelectFunction(GregorianCalendar date)function(){}called when a date is selected from calendar
onBlurFunction()function(){}called when calendar loose focus

Calendar.Picker props

nametypedefaultdescription
calendarCalendar React Element
adjustOrientOnCalendarOverflowBooleantruewhether adjust calendar orient if there is not enough space to show. better false if animation is 'slide-up'
animationStringindex.css support 'slide-up'
transitionNameStringcss class for animation
renderCalendarToBodyBooleanfalsewhether render picker's calendar to document.body
formatter GregorianCalendarFormatter use to format/parse value to/from input
triggerReact.Elementadditional trigger appended to picker
valueGregorianCalendarcurrent value like input's value
defaultValueGregorianCalendardefaultValue like input's defaultValue
onChangeFunctioncalled when select a different value

Test Case

http://localhost:8001/tests/runner.html?coverage

Coverage

http://localhost:8001/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8001/tests/runner.html?coverage

License

rc-calendar is released under the MIT license.

Keywords

FAQs

Last updated on 02 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc