5.0.2 • Published 8 months ago

@brighthr/component-datepicker v5.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

DatePicker

To install, type the following into the command line at the root of your project:

npm i @brighthr/component-datepicker

To implement the DatePicker component into your project you’ll need to add the import:

import DatePicker from '@brighthr/component-datepicker';

To implement the DateRangePicker component into your project you’ll need to add the import:

import { DateRangePicker } from '@brighthr/component-datepicker';

After adding import into your project you can use it simply like:

<DatePicker />
  or
<DateRangePicker />

DatePicker Props

NameTypeDefaultDescription
autoFocusbooleanfalseIf true, the calendar be be open and focused when the input is rendered.
dateDateThe currently selected date.
errorbooleanfalseIf true, the input will show with a red theme.
idstringSets an id to be used in combination with a label for attribute.
legacyStylingbooleanfalseIf true, the calendar will have the older appearance.
localestring"en-gb"Changes the date formats to suit the selected locale.
maxDateDate'1900-01-01'Sets the maximum date that can be input
minDateDate'2100-12-31'Sets the minimum date that can be input
onBlur() => voidFunction for handling onBlur event.
onChange() => voidFunction for handling onChange event.
onFocus() => voidFunction for handling onFocus event.
placeholderstring"dd/mm/yyyy"Sets the placeholder text for the input.
relativePositionbooleanfalseIf true, the calendar position will be relative instead of absolute.
setDate(date) => voidFunction for setting the external state when the date is set.

DateRangePicker Props

NameTypeDefaultDescription
endDateDatenullValue for the end date.
errorbooleanfalseIf true, the input will show with a red theme.
legacyStylingbooleanfalseIf true, the calendar will have the older appearance.
localestring"en-gb"Changes the date formats to suit the selected locale.
maxDateDate'1900-01-01'
minDateDate'2100-12-31'
onBlur() => voidFunction for handling onBlur event.
onChange() => voidFunction for handling onChange event.
placeholderstring"Select date range"Sets the placeholder text for the input.
setEndDate(date) => voidFunction for setting the external state when the end date is set.
setStartDate(date) => voidFunction for setting the external state when the start date is set.
startDateDateValue for the start date.
5.0.3-0

8 months ago

5.0.2

8 months ago

5.0.1

8 months ago

5.0.0

9 months ago

5.0.2-0

8 months ago

5.0.2-1

8 months ago

5.0.0-0

9 months ago

5.0.0-1

9 months ago

4.1.4

12 months ago

4.1.3

1 year ago

4.1.6

11 months ago

4.1.5

12 months ago

4.1.2

1 year ago

4.1.1

1 year ago

4.1.0

1 year ago

4.0.2

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.3.1

2 years ago

2.3.0

2 years ago

2.2.7

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.6

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

1.0.33

2 years ago

1.0.26

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.15

2 years ago

1.0.11

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.10

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

1.0.3

3 years ago

0.0.19

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago