1.2.21 • Published 4 years ago

@crpt/react-datepicker v1.2.21

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

react-datepicker

Travis npm package Coveralls

DatePicker

Components for date picking (DatePicker) and date range picking (RangePicker).

Usage

import { DatePicker, RangePicker } from  "@crpt/react-datepicker";


<DatePicker onChange={newVal => alert("newVal:", newVal)}  date="12.12.2012" />

DatePicker

PropNameDescriptionExample
date: StringSelected date in ISO 8601 format.<DatePicker date="2014/01/02" />
format: stringDate input format<DatePicker date="10.09.2014" format="DD.MM.YYYY">
onChange: FunctionCalled, when DatePicker input value changed.<DatePicker onChange={val => alert(val)} />
onUpdate: FunctionВызывается, когда DatePicker теряет фокус или пользователь нажимает Enter.<DatePicker onUpdate={val => alert(val)} />
placeholder: StringSet placeholder<DatePicker placeholder="Order date" />
savePlaceholder: BooleanDon't hide placeholder<DatePicker savePlaceholder />
positionX: stringif value is "left" calendar is showed at the left, otherwise - right
positionY: stringif value is "top" calendar is showed at the top, otherwise - bottom
monthView: boolSwitches to month view
acceptText: stringAccept control text. Default: 'Accept'
resetText: stringReset control text. Default: 'Reset'
onTogglePanel: FunctionCallback on toggle OptionsPanel visibility
showPointer: boolshow dialogue pointer
minDate: stringMinimal date
maxDate: stringMaximal date
rightIconReplacer: elementJSX to replace both icons at once

RangePicker

PropNameDescriptionExample
from: StringСтартовая дата диапазона в формате ISO 8601.<RangePicker from="2012-12-12" />
to: StringКонечная дата диапазона в формате ISO 8601.<RangePicker to="2014/01/02" />
format: stringDate input format<RangePicker from="10.09.2014" to="20.09.2014" format="DD.MM.YYYY">
onChange: FunctionВызывается, когда меняется значение в DatePicker, параметром принимает объект с полями to и from.<RangePicker onChange={val => alert(val)} />
onUpdate: FunctionВызывается, когда RangePicker теряет фокус или пользователь нажимает Enter.<RangePicker onUpdate={val => alert(val)} />
leftPlaceholder: StringSet placeholder for left input<RangePicker leftPlaceholder="Order date" />
rightPlaceholder: StringSet placeholder for right input<RangePicker rightPlaceholder="Order date" />
savePlaceholder: BooleanDon't hide placeholder<RangePicker savePlaceholder />
positionX: stringif value is "left" calendar is showed at the left, otherwise - right
positionY: stringif value is "top" calendar is showed at the top, otherwise - bottom
acceptText: stringAccept control text. Default: 'Accept'
resetText: stringReset control text. Default: 'Reset'
onTogglePanel: FunctionCallback on toggle OptionsPanel visibility
showPointer: boolshow dialogue pointer
minDate: stringMinimal date
maxDate: stringMaximal date
noActions: boolRemove buttons accept/clear
noAutoFocus: boolDo not focus right input after left date select
1.2.21

4 years ago

1.2.20

5 years ago

1.2.19

5 years ago

1.2.17

5 years ago

1.2.16

5 years ago

1.2.15

5 years ago

1.2.14

5 years ago

1.2.13

5 years ago

1.2.11

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.34

5 years ago

1.1.33

5 years ago

1.1.32

5 years ago

1.1.31

5 years ago

1.1.30

5 years ago

1.1.29

5 years ago

1.1.28

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.16

5 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.2

6 years ago