0.2.31 • Published 3 years ago

react-moment-input v0.2.31

Weekly downloads
234
License
ISC
Repository
bitbucket
Last release
3 years ago

react-moment-input

npm Codeship Status for kenanberbic/react-moment-input Known Vulnerabilities

React datetime picker powered by momentjs

The design is from http://wangzuo.github.io/input-moment/.

The icon is from ionicons.

Demo: react-moment-input.

Source: react-moment-input.

Issue tracker: react-moment-input

Support:

  • Date time picker
  • Translations
  • Different date formats, support for AM/PM YYYY-MM-DD hh:mm AA
  • Tab selection
  • Month selection
  • Current day
  • Days of week order
  • Min and max date
  • Icon support
  • Custom style

Installation

npm i react-moment-input --save

Usage

import MomentInput from 'react-moment-input';

<MomentInput
              max={moment().add(5,'days')}
              min={moment()}
              format="YYYY-MM-DD HH:mm"
              options={true}
              readOnly={false}
              icon={false}
              onChange={(date)=> {console.log(date)}} />

Usage Available properties

PropertyTypeContentDefault Value
minmomentMin selected dateundefined
maxmomentMax selected dateundefined
valuemomentThe current valueundefined
defaultValuemomentThe current value, only apply on component mountundefined
formatstringDate time formatYYYY-MM-DD HH:mm
tabNumberSelected tab: 0-Calendar, 1-Time, 2-Year0
optionsbooleanShow header optionstrue
positionstringPicker positions : 'bottom' or 'right'bottom
readOnlybooleanDisable inputtrue
monthSelectbooleanDisable month select controlfalse
todaybooleanToday buttonfalse
isOpenbooleanShow pickerfalse
showIconbooleanShow calendar iconfalse
daysOfWeekarrayDays order in a week['Sun','Mon','Tue', '...']
translationsJSON{DATE:"Date", TIMES:"Times", DAYS_MON:"Mon", MONTHS_OCTOBER:"October"}{}
styleJSONContainer styleundefined
classNamestringContainer classr-input-group
inputStyleJSONInput styleundefined
inputClassNamestringInput classr-input
onChangefunctionEmit value on every click (value, name)undefined
onSavefunctionEmit value on save click (value, name)undefined
onClosefunctionEmit value on picker close (value, name)undefined
enableInputClickbooleanShow pickerundefined
iconRenderedfunctionRenders custom component as iconundefined
autoClosebooleanClose picker on value changeundefined

Development

License

ISC

0.2.31

3 years ago

0.2.30

5 years ago

0.2.29

5 years ago

0.2.28

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.2.19

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago