Socket
Socket
Sign inDemoInstall

rc-datetime-picker

Package Overview
Dependencies
10
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-datetime-picker

React datetime picker by momentjs


Version published
Maintainers
1
Install size
3.60 MB
Created

Readme

Source

Rc-Datetime-Picker

Rc-Datetime-Picker is a react component for datetime picker by Moment.js.

Requirements

  • React
  • Moment.js
  • Modern browsers (IE>=9 is required)

Installation

Install with NPM

$ npm install rc-datetime-picker

Manual download

Besides npm package, UMD module is placed under dist/ directory:

  • dist/rc-datetime-picker.js
  • dist/rc-datetime-picker.min.js

Usage

See the demo page.

Props

DatetimePicker Props

NameTypeDefaultDescription
momentmomentSet the selected date.
onChangeFunction(datetime: moment)`onChange` will be triggered while datetime changing.
classNameStringAdditional css class of root dom node.
isOpenBooleantrueWhether to show the picker.
showCalendarPickerBooleantrueWhether to show the calendar picker.
showTimePickerBooleantrueWhether to show the time picker.
splitPanelBooleanfalseEnable `split-panel` mode.
shortcutsObject:{name: value}Add shortcuts on the top `shortcuts-bar` for selecting a date.
maxDatemomentMax Date limit.
minDatemomentMin Date limit.
weeksArray['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']Text for weekdays.
monthsArray[Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']Text for months.
dayFormatString'MMMM, YYYY'Formatting current date of the day panel.
minPanelString'day'Min panel for select.

DatetimePickerTrigger Props

NameTypeDefaultDescription
momentmomentSet the selected date.
onChangeFunction(datetime: moment)`onChange` will be triggered while datetime changing.
classNameStringAdditional css class of root dom node.
showCalendarPickerBooleantrueWhether to show the calendar picker.
showTimePickerBooleantrueWhether to show the time picker.
splitPanelBooleanfalseEnable `split-panel` mode.
shortcutsObject:{name: value}Add shortcuts on the top `shortcuts-bar` for selecting a date.
maxDatemomentMax Date limit.
minDatemomentMin Date limit.
weeksArray['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']Text for weekdays.
monthsArray[Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']Text for months.
dayFormatString'MMMM, YYYY'Formatting current date of the day panel.
appendToBodyBooleanfalseWhether to render the picker to `body`.
closeOnSelectDayBooleanfalseWhether to close the picker when selecting a date on day panel.
disabledBooleanfalseDisabled triggering.
minPanelString'day'Min panel for select.

DatetimeRangePicker Props

NameTypeDefaultDescription
momentObject: {start: moment, end: moment}Set the selected date range.
onChangeFunction(datetime: {start: moment, end: moment})`onChange` will be triggered while confirm button or shortcuts clicked.
classNameStringAdditional css class of root dom node.
showCalendarPickerBooleantrueWhether to show the calendar picker.
showTimePickerBooleanfalseWhether to show the time picker.
splitPanelBooleanfalseEnable `split-panel` mode.
shortcutsObject:{name: {start: moment, end: moment}}Add shortcuts on the top `shortcuts-bar` for selecting a date range.
maxDatemomentMax Date limit.
minDatemomentMin Date limit.
weeksArray['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']Text for weekdays.
monthsArray[Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']Text for months.
dayFormatString'MMMM, YYYY'Formatting current date of the day panel.
formatString'YYYY/MM/DD HH:mm' / 'YYYY/MM/DD'Formatting current date of each panel.
showCustomButtonBooleanfalseWhether to show the custom button.
customButtonTextStringCustomText for custom button.
customRangeObject: {start: moment, end: moment}Last 30 daysSet the custom button value.
confirmButtonTextStringConfirmText for confirm button.
startDateTextStringStart Date:Text for start date label.
endDateTextStringEnd date:Text for end date label.
dateLimitObject: {name: value}Date range limt.
minPanelString'day'Min panel for select.

DatetimeRangePickerTrigger Props

NameTypeDefaultDescription
momentObject: {start: moment, end: moment}Set the selected date range.
onChangeFunction(datetime: {start: moment, end: moment})`onChange` will be triggered while confirm button or shortcuts clicked.
classNameStringAdditional css class of root dom node.
showCalendarPickerBooleantrueWhether to show the calendar picker.
showTimePickerBooleanfalseWhether to show the time picker.
splitPanelBooleanfalseEnable `split-panel` mode.
shortcutsObject:{name: {start: moment, end: moment}}Add shortcuts on the top `shortcuts-bar` for selecting a date range.
maxDatemomentMax Date limit.
minDatemomentMin Date limit.
weeksArray['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']Text for weekdays.
monthsArray[Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']Text for months.
dayFormatString'MMMM, YYYY'Formatting current date of the day panel.
formatString'YYYY/MM/DD HH:mm' / 'YYYY/MM/DD'Formatting current date of each panel.
showCustomButtonBooleanfalseWhether to show the custom button.
customButtonTextStringCustomText for custom button.
customRangeObject: {start: moment, end: moment}Last 30 daysSet the custom button value.
confirmButtonTextStringConfirmText for confirm button.
startDateTextStringStart Date:Text for start date label.
endDateTextStringEnd date:Text for end date label.
dateLimitObject: {name: value}Date range limt.
appendToBodyBooleanfalseWhether to render the picker to `body`.
disabledBooleanfalseDisabled triggering.
minPanelString'day'Min panel for select.

Keywords

FAQs

Last updated on 23 Jan 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc