5.0.1 • Published 2 years ago

@paprika/date-picker v5.0.1

Weekly downloads
2,418
License
MIT
Repository
github
Last release
2 years ago

@paprika/date-picker

Description

DatePicker component allows user to view and specify a date through an entry field or a calendar widget.

Installation

yarn add @paprika/date-picker

or with npm:

npm install @paprika/date-picker

Props

DatePicker

PropTyperequireddefaultDescription
childrennodefalsenull
dateFormatstringfalse"MM/DD/YYYY"Date format used while entering and parsing user input.
dateinstanceOffalsenullSelected date in moment object.
humanFormatstringfalseundefinedDate format used while displaying date. It should be human-friendly and spelled out, default is MMMM DD,YYYY
isDisabledboolfalsefalseShould be disabled or not, default is false.
isReadOnlyboolfalsefalseShould be read-only or not, default is false.
onChangefunctrue-Callback when date is selected or input.
onErrorfuncfalse() => {}Internal errors callback
hasErrorboolfalsefalseIf there is an external error or not.

DatePicker.Input

PropTyperequireddefaultDescription
a11yTextstringfalsenulla11yText on the input.
clearIconnodefalsenullCustom clear icon
placeholderstringfalse""Placeholder of input.
size Input.types.size.SMALL, Input.types.size.MEDIUM, Input.types.size.LARGEfalseInput.types.size.MEDIUMSize of input.
hasErrorboolfalsefalseIf the value of <input> is valid or not.

DatePicker.Popover

PropTyperequireddefaultDescription
align Popover.types.align.TOP, Popover.types.align.RIGHT, Popover.types.align.BOTTOM, Popover.types.align.LEFTfalsePopover.types.align.BOTTOMWhere the popover content is positioned relative to the trigger or getPositioningElement.
childrennodetrue-Content of the popover
isDarkboolfalsefalseDisplays as a "tooltip" style with white text on black background.
isEagerboolfalsefalseActivated by mouseOver / focus instead of onClick.
isOpenboolfalsenullHow "controlled" popovers are shown / hidden.
isPortalboolfalsetrueThis renders the popover inline in the DOM and not in a react portal. WARNING: will have side effects with paprika side panels and modals, use with caution.
defaultIsOpenboolfalsenullHow "uncontrolled" popovers can be rendered open by default.
edge Popover.types.align.LEFT, Popover.types.align.RIGHT, nullfalsenullWhere the edge of the popover content is based on the trigger or getPositioningElement
maxWidthstring,numberfalse320Maximum width of popover content. Using a number is recommended and implies px units.
minWidthstring,numberfalse0Minimumn width of popover content. Using a number is recommended and implies px units.
onClosefuncfalsenullCallback to fire when user closes popover.
offsetnumberfalsetoInt(tokens.space)Distance, in px, between popover content edge and trigger / getPositioningElement.
getPositioningElementfuncfalsenullFunction that provides DOM element to use as target for positioning the popover.
getScrollContainerfuncfalsenullFunction that provides the scrolling DOM element that contains the popover.
shouldKeepFocusboolfalsefalseIf focus will stay at the trigger when showing popover. Popover can still be closed when clicking outside or pressing escape key.
zIndexnumberfalsezValue(1)Number setting the z-index for the popover content / tip.

Usage

Please use <L10n /> component to wrap <DatePicker /> or you application.

DatePicker

For a basic date picker

import DatePicker from "@paprika/date-picker";

<DatePicker onChange={changeHandler} />;

Customized input

import DatePicker from "@paprika/date-picker";

<DatePicker onChange={changeHandler}>
  <DatePicker.Input placeholder="Date..." />
</DatePicker>;

Links

5.0.1

2 years ago

5.0.1-next.0

2 years ago

5.0.0

2 years ago

5.0.0-next.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.0-next.0

2 years ago

4.0.1-next.0

2 years ago

3.0.4-next.0

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.3-next.0

3 years ago

3.0.2-next.0

3 years ago

3.0.0-next.1

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.1-next.0

3 years ago

2.0.7

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.7-next.1

3 years ago

2.0.7-next.0

3 years ago

2.0.9-next.0

3 years ago

2.0.8-next.0

3 years ago

2.0.6-next.2

3 years ago

2.0.6-next.1

3 years ago

2.0.6-next.0

3 years ago

2.0.6

3 years ago

2.0.5

4 years ago

2.0.5-next.0

4 years ago

2.0.5-next.1

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.4

4 years ago

2.0.2-next.0

4 years ago

2.0.3-next.2

4 years ago

2.0.3-next.1

4 years ago

2.0.3-next.0

4 years ago

2.0.3-next.3

4 years ago

2.0.4-next.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.1-next.0

4 years ago

2.0.0-next.1

4 years ago

2.0.0-next.0

4 years ago

1.0.26

4 years ago

1.0.26-next.0

4 years ago

1.0.25

4 years ago

1.0.25-next.0

4 years ago

1.0.24

4 years ago

1.0.24-next.0

4 years ago

1.0.23

4 years ago

1.0.23-next.0

4 years ago

1.0.22-next.0

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.21-next.0

4 years ago

1.0.20-next.0

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.19-next.0

4 years ago

1.0.18

4 years ago

1.0.18-next.0

4 years ago

1.0.17-next.0

4 years ago

1.0.16-next.0

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.14-next.0

4 years ago

1.0.15-next.0

4 years ago

1.0.13-next.0

4 years ago

1.0.13-next.1

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.12-next.0

4 years ago

1.0.11

4 years ago

1.0.11-next.0

4 years ago

1.0.10

4 years ago

1.0.10-alpha.2

4 years ago

1.0.10-alpha.1

4 years ago

1.0.10-alpha.0

4 years ago

1.0.9

4 years ago

1.0.9-alpha.0

4 years ago

1.0.8

4 years ago

1.0.8-alpha.0

4 years ago

1.0.7

4 years ago

1.0.7-alpha.0

4 years ago

1.0.6

4 years ago

1.0.6-alpha.0

4 years ago

1.0.5

5 years ago

1.0.5-alpha.0

5 years ago

1.0.4

5 years ago

1.0.4-alpha.0

5 years ago

1.0.3

5 years ago

1.0.3-alpha.2

5 years ago

1.0.3-alpha.1

5 years ago

1.0.3-alpha.0

5 years ago

1.0.2-alpha.3

5 years ago

1.0.2-alpha.2

5 years ago

1.0.2-alpha.1

5 years ago

1.0.1

5 years ago

1.0.2-alpha.0

5 years ago

1.0.1-alpha.1

5 years ago

1.0.1-alpha.0

5 years ago

1.0.0

5 years ago

0.5.59

5 years ago

0.5.59-alpha.5

5 years ago

0.5.59-alpha.4

5 years ago

0.5.59-alpha.2

5 years ago

0.5.59-alpha.3

5 years ago

0.5.59-alpha.1

5 years ago

0.5.59-alpha.0

5 years ago

0.5.58

5 years ago

0.5.56

5 years ago

0.5.57

5 years ago

0.5.55

5 years ago

0.5.54

5 years ago

0.5.53

5 years ago

0.5.52

5 years ago

0.5.51

5 years ago

0.5.50

5 years ago

0.5.49

5 years ago

0.5.48

5 years ago

0.5.47

5 years ago

0.5.46

5 years ago

0.5.45

5 years ago

0.5.44

5 years ago

0.5.43

5 years ago

0.5.41

5 years ago

0.5.42

5 years ago

0.5.40

5 years ago

0.5.39

5 years ago

0.5.38

5 years ago

0.5.37

5 years ago

0.5.36

5 years ago

0.5.35

5 years ago

0.5.34

5 years ago

0.5.33

5 years ago

0.5.32

5 years ago

0.5.31

5 years ago

0.5.30

5 years ago

0.5.29

5 years ago

0.5.28

5 years ago

0.5.27

5 years ago

0.5.26

5 years ago

0.5.25

5 years ago

0.5.24

5 years ago

0.5.23

5 years ago

0.5.22

5 years ago

0.5.21

5 years ago

0.5.20

5 years ago

0.5.19

5 years ago

0.5.18

5 years ago

0.5.17

5 years ago

0.5.16

5 years ago

0.5.15

5 years ago

0.5.14

5 years ago

0.5.13

5 years ago

0.5.12

5 years ago

0.5.11

5 years ago

0.5.10

6 years ago

0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.15

6 years ago

0.3.14

6 years ago

0.3.13

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.10

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago