Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

be-calendar

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

be-calendar

React Calendar

  • 6.1.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

be-calendar


This is a fork of https://github.com/react-component/calendar

Use the original repository and original package of npm, this package is only for testing purpose

React Calendar

NPM version build status Test coverage gemnasium deps npm download

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

import Calendar from 'rc-calendar';
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.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

rc-calendar props

nametypedefaultdescription
prefixClsStringprefixCls of this component
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
localeObjectimport from 'rc-calendar/lib/locale/en_US'calendar locale
formatterString|GregorianCalendarFormatter. see GregorianCalendarFormatter specyyyy-MM-dduse to format/parse date(without time) value to/from input
disabledDateFunction(current:GregorianCalendar):Booleannullwhether to disable select of current date
disabledTimeFunction(current:GregorianCalendar):Objectnulla function which return a object with member of disabledHours/disabledMinutes/disabledSeconds according to rc-time-picker
showDateInputBooleantruewhether to show input on top of calendar panel
showWeekNumberBooleanfalsewhether to show week number of year
showTodayBooleantruewhether to show today button
timePickerReact Elementnullrc-timer-picker element
onSelectFunction(date: GregorianCalendar)function(){}called when a date is selected from calendar
onChangeFunction(date: GregorianCalendar)function(){}called when a date is changed inside calendar (next year/next month/keyboard)
dateInputPlaceholderString''date input's placeholder

rc-calendar/lib/RangeCalendar props

nametypedefaultdescription
prefixClsStringprefixCls of this component
classNameStringadditional css class of root dom node
styleObjectadditional style of root dom node
selectedValue GregorianCalendar[] current selected value range. with two elements.
defaultSelectedValueGregorianCalendar[]default selected value range
localeObjectimport from 'rc-calendar/lib/locale/en_US'calendar locale
formatterString|GregorianCalendarFormatter. see GregorianCalendarFormatter specyyyy-MM-dduse to format/parse date(without time) value to/from input
disabledDateFunction(current:GregorianCalendar):Booleannullwhether to disable select of current date
showWeekNumberBooleanfalsewhether to show week number of year
timePickerReact Elementnullrc-timer-picker element
onSelectFunction(date: GregorianCalendar[])function(){}called when a date range is selected from calendar
onChangeFunction(date: GregorianCalendar[])function(){}called when a date range is changed inside calendar (next year/next month/keyboard)
dateInputPlaceholderString[]range date input's placeholders

rc-calendar/lib/MonthCalendar props

nametypedefaultdescription
prefixClsStringprefixCls of this component
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
localeObjectimport from 'rc-calendar/lib/locale/en_US'calendar locale
disabledDateFunction(current:GregorianCalendar):Booleannullwhether to disable select of current month
onSelectFunction(date: GregorianCalendar)function(){}called when a date is selected from calendar
onChangeFunction(date: GregorianCalendar)function(){}called when a date is changed inside calendar (next year/next month/keyboard)

rc-calendar/lib/Picker props

nametypedefaultdescription
prefixClsStringprefixCls of this component
calendarCalendar React Element
disabledBooleanwhether picker is disabled
placementString|Objectone of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight']
alignObject: alignConfig of [dom-align](https://github.com/yiminghe/dom-align)value will be merged into placement's align config.
animationStringindex.css support 'slide-up'
transitionNameStringcss class for animation
valueGregorianCalendar|GregorianCalendar[]current value like input's value
defaultValueGregorianCalendar|GregorianCalendar[]defaultValue like input's defaultValue
onChangeFunctioncalled when select a different value
onOpenFunctioncalled when open picker
onCloseFunctioncalled when close picker
openBooleancurrent open state of picker. controlled prop
getCalendarContainerFunction():Elementfunction(){return document.body;}dom node where calendar to be rendered into

rc-calendar/lib/FullCalendar props

nametypedefaultdescription
prefixClsStringprefixCls of this component
SelectReact Component Classrc-select Component Class
value GregorianCalendar current value like input's value
defaultValueGregorianCalendardefaultValue like input's defaultValue
defaultTypestringdatedefault panel type: date/month
typestringpanel type: date/month
onTypeChangefunction(type)called when panel type change
fullscreenboolfalse
monthCellRenderfunctionCustom month cell render method
dateCellRenderfunctionCustom date cell render method
monthCellContentRenderfunctionCustom month cell content render method,the content will be appended to the cell.
dateCellContentRenderfunctionCustom date cell content render method,the content will be appended to the cell.
onSelectFunction(date: GregorianCalendar)function(){}called when a date is selected from calendar

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-calendar is released under the MIT license.

Keywords

FAQs

Package last updated on 10 Aug 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc