0.1.10 • Published 3 years ago

@compeon/datepicker v0.1.10

Weekly downloads
132
License
MIT
Repository
-
Last release
3 years ago

Simple datepicker component built with react, styled-components and date-fns

Screenshot Screenshot

Installation

yarn add @compeon/datepicker

You also need to have styled-components installed, so if that's not the case already

yarn add styled-components

Usage

import Datepicker from '@compeon/datepicker'

<Datepicker date={new Date()} onChange={this.handleChange}>
  <div>Click me</div>
</Datepicker>

Props

propdescriptiondefault
datethe currently selected datenew Date()
displayIsoWeekwhether to display the ISO week number next to the weektrue
localethe locale that is used for displaying monthnames and weekday namesde
onBlurfunction that is called when the picker is blurred-
onFocusfunction that is called when the picker is focussed-
onChangefunction that is called when the selected date changes. First param is the selected date. Second param is always the triggering event.-
childrennode(s) which on click trigger the opening of the picker-
selectableDateseither an object in the format { before: 2019, after: 2016 } (also works with only one of after or before) or an array with the allowed dates [new Date(2018, 5, 2), new Date(2017, 5 2)]-
weekStartsOnwhich weekday to use as the first day1
primaryColorthe primary color that is used#27718c
secondaryColorthe secondary color that is usedwhite
hoverColorthe color that is used for hovering over a date#d3d3d330
classNameclassName passed to the outer wrapper-
dialogClassNameclassName passed to the dialog component that is rendered when the dialog is open-

Author

baahrens (bahrens@compeon.de)

COMPEON

License

MIT

0.1.10

3 years ago

0.1.9

3 years ago

0.1.7

4 years ago

0.1.7-beta.1

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago