0.5.1 • Published 2 years ago

@compeon/monthpicker v0.5.1

Weekly downloads
142
License
MIT
Repository
github
Last release
2 years ago

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

Screenshot

Installation

yarn add @compeon/monthpicker

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

yarn add styled-components

Usage

import Monthpicker from '@compeon/monthpicker'

<Monthpicker format='MM.yyyy' onChange={this.handleChange}>
  <div>Click me</div>
</Monthpicker>

Props

propdescriptiondefault
monththe currently selected monthnew Date().getMonth()
yearthe currently selected yearnew Date().getFullYear()
localethe locale that is used for displaying monthnamesde
formatformat the onChange function is called with. Can be anything from this listMM.yyyy
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 month changes. Will be called with { month: 1, year: 2018 } as the first param when no format is specified. Second param is always the triggering event.-
childrennode(s) which on click trigger the opening of the picker-
allowedYearseither an object in the format { before: 2019, after: 2016 } (also works with only one of after or before) or an array with the allowed years [2016, 2017, 2018]-
primaryColorthe primary color that is used#27718c
secondaryColorthe secondary color that is usedwhite
hoverColorthe color that is used for hovering over a month#d3d3d330

Author

baahrens (bahrens@compeon.de)

COMPEON

License

MIT

0.5.0

2 years ago

0.5.1

2 years ago

0.4.13

3 years ago

0.4.12

3 years ago

0.4.11

3 years ago

0.4.9

3 years ago

0.4.10

3 years ago

0.4.8

3 years ago

0.4.7

3 years ago

0.4.6

3 years ago

0.4.5

4 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 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