0.0.17 • Published 5 years ago

@beisen/ux-m-date-picker v0.0.17

Weekly downloads
1
License
-
Repository
gitlab
Last release
5 years ago

rmc-date-picker


React Mobile DatePicker Component (web and react-native)

NPM version react-native react build status Test coverage gemnasium deps node version npm download

Screenshots

web

ios

android

Usage

see example

config webpack to resolve .web.js

resolve: {
  extensions: ['', '.web.tsx', '.web.ts', '.web.jsx', '.web.js', '.ts', '.tsx', '.js', '.jsx', '.json'],
},

Development

npm i
npm start

Example

http://localhost:8000/examples/

online example: http://react-component.github.io/m-date-picker/

react-native

npm run watch-tsc
./node_modules/rc-tools run react-native-init
react-native run-ios

install

rmc-date-picker

API

DatePicker props

namedescriptiontypedefault
className(web)additional css class of root dom nodeString''
prefixCls(web)prefix classString'rmc-date-picker'
pickerPrefixCls(web)picker prefix classString'rmc-picker'
defaultDatedefault selected date.moment
dateThe currently selected date.moment
modeThe date picker mode.String'date' enum('date', 'time', 'datetime', 'year', 'month')
minDatemin datemoment2000-1-1
maxDatemax datemoment2030-1-1
localethe locale of areaObjectimport from 'rmc-date-picker/lib/locale/en_US'
onDateChangeDate change handler.Function(date: moment)''
minuteStepThe amount of time, in minutes, between each minute item. Number1
formatMonthCustomize display value of months(month:number, current:moment) => React.Node
formatDayCustomize display value of days(day:number, current:moment) => React.Node

rmc-date-picker/lib/Popup props

namedescriptiontypedefault
className(web)additional css class of modal nodeString''
style(web)additional modal styleobject{}
popupTransitionName(web)String
maskTransitionName(web)String
prefixCls(web)popup's prefix classString'rmc-picker-popup'
styles(react-native)PopupPicker's stylesStyleSheet.create
datePickerDatePicker elementReact DatePicker element
dateThe currently selected date.moment
visiblewhether pop picker is visibleBooleanfalse
onChangeexec on okFunction(date: moment)
onVisibleChangecalled when pop picker visible changeFunction
onDismissexec on dismissfunction
okTextok button textstring/React.ReactElement'Ok'
dismissTextdismiss button textstring/React.ReactElement'Dismiss'
titlePopup titlestring/React.ReactElement''

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rmc-date-picker is released under the MIT license.

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.8

6 years ago