1.2.21 • Published 6 years ago

@crpt/react-datepicker v1.2.21

Weekly downloads
7
License
MIT
Repository
github
Last release
6 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

6 years ago

1.2.20

6 years ago

1.2.19

6 years ago

1.2.17

6 years ago

1.2.16

6 years ago

1.2.15

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.11

6 years ago

1.2.10

6 years ago

1.2.9

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.34

6 years ago

1.1.33

6 years ago

1.1.32

6 years ago

1.1.31

6 years ago

1.1.30

6 years ago

1.1.29

6 years ago

1.1.28

6 years ago

1.1.27

6 years ago

1.1.26

6 years ago

1.1.25

7 years ago

1.1.24

7 years ago

1.1.23

7 years ago

1.1.22

7 years ago

1.1.21

7 years ago

1.1.20

7 years ago

1.1.19

7 years ago

1.1.18

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.2

7 years ago