Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
33 lines (24 loc) · 769 Bytes

datepicker.md

File metadata and controls

33 lines (24 loc) · 769 Bytes

Forms/Datepicker

Renders an input with drop down date picker.

Datepicker example

<Datepicker
    onSelect={(date) => {
        console.log(date.toString());
    }}
/>

Props

placeholder={string}}
Text to display in the input field until a value is chosen.

date={Date}
The initial date to display. Defaults to now.

days={array}
Days of the week, e.g. 'Sunday', 'Monday', etc. Defaults to the English spelling.

months={array}
Months of the year, e.g. 'January', 'February', etc. Defaults to the English spelling.

onSelect={function}
Called when a date is chosen. Receives a Date object with the chosen date.

CSS

Adds dp-datepicker to the root element.