Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DateTimePicker with React and Bootstrap

NotificationsYou must be signed in to change notification settings

Randagio13/react-datetimepicker-bootstrap

Repository files navigation

Docs & Help

Installation

Usingnpm:

$ npm install --save react-datetimepicker-bootstrap

Usage

// ES5varDateTimePicker=require('react-datetimepicker-bootstrap');varExample=React.createClass({render:function(){return(<DateTimePickerid="datetimepicker"/>);}});// ES6importDateTimePickerfrom'react-datetimepicker-bootstrap';classExampleextendsReact.Component{render(){return(<DateTimePickerid="datetimepicker"/>);}}exportdefaultExample;

Props component:

id:

  • Type:string.
  • isRequired:
  • DefaultValue:undefined
  • Description: component id.

icon:

  • Type:string.
  • isRequired:
  • DefaultValue:undefined
  • Description: The position of the icon, accept:left orright.

iconType:

  • Type:string.
  • isRequired:
  • DefaultValue:calendar
  • Description: View the bootstrapiconSet.

placeholder:

  • Type:string.
  • isRequired:
  • DefaultValue:undefined
  • Description: The simple placeholder input.

locale:

  • Type:string.
  • isRequired:
  • DefaultValue:en
  • Description: Translate the calendare.g.: 'it', 'en', 'ru', ... .

format:

  • Type:string.
  • isRequired:
  • DefaultValue:moment().format()
  • Description: Set the format date view e.g:D/M/YYYY.

minDate:

  • Type:arrayOf(string) orobject.
  • isRequired:
  • DefaultValue:undefined
  • Description: Set the minDate start in the calendar, accept:moment() ornew Date().

maxDate:

  • Type:arrayOf(string) orobject.
  • isRequired:
  • DefaultValue:undefined
  • Description: Set the minDate start in the calendar, accept:moment() ornew Date().

disabledDates:

  • Type:arrayOf(string) orobject.
  • isRequired:
  • DefaultValue:undefined
  • Description: Disable the dates.

daysOfWeekDisabled:

  • Type:array.
  • isRequired:
  • DefaultValue:undefined
  • Description: Disable a single day in the week, e.g:[0,6].

viewMode:

  • Type:string.
  • isRequired:
  • DefaultValue:days
  • Description: Set the viewMode of the calendar, accept:decades,years,months.

allowInputToggle:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: It'll show the datetimepicker on the textbox focus. If the icon is empty then it's set true.

hasFeedback:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: It show the typical feedback bootstrap style.

bsStyle:

  • Type:string.
  • isRequired:
  • DefaultValue:''
  • Description: Set the validation color, accept:success,error,warning.

getValue:

  • Type:function.
  • isRequired:
  • DefaultValue:undefined
  • Description: Return the date selected.

inline:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: View the datetimepicker without the modal view.

sideBySide:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: View the datetimepicker without the icon date/time.

calendarWeeks:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: It shows the week of the year to the left of first day of the week.

toolbarPlacement:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: It changes the placement of the icon toolbar.

disabled:

  • Type:boolean.
  • isRequired:
  • DefaultValue:false
  • Description: It disabled the input field.

tooltips:

  • Type:object.
  • isRequired: ✘.
  • DefaultValue:
{today:'Go to today',clear:'Clear selection',close:'Close the picker',selectMonth:'Select Month',prevMonth:'Previous Month',nextMonth:'Next Month',selectYear:'Select Year',prevYear:'Previous Year',nextYear:'Next Year',selectDecade:'Select Decade',prevDecade:'Previous Decade',nextDecade:'Next Decade',prevCentury:'Previous Century',nextCentury:'Next Century'}
  • Description: This will change thetooltips over each icon to a custom string.

License

MIT(http://www.opensource.org/licenses/mit-license.php)

About

DateTimePicker with React and Bootstrap

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp