@foundation-base/calendar-date-picker
v5.4.0
Published
Base Calendar Date Picker component for foundation
Downloads
109
Readme
@foundation-base/calendar-date-picker
Base Calendar Date Picker component for foundation
Props
availableSlots: object
The availableSlots
prop is used to pass the information regarding the dates available for selection
The object structure is as follows:
availableSlots = {
[year: number]: {
[month: number]: Array<number>;
};
};
startDate?: string
The startDate
prop is to set a lower limit for calendar navigation. The string can be of any format that can be accepted by the Date
constructor.
endDate?: string
The endDate
prop is to set a upper limit for calendar navigation. The string can be of any format that can be accepted by the Date
constructor.
onClick: (e: any) => void
The onClick
can be used to pass a function to retrieve the date string of the date on which the user clicks.
onChange: (month: number, year: number) => void
The onChange
can be used to pass a function to retrieve the month and year of the current calendar being displayed. This function gets triggered everytime the user goes to the next or previous month.
Install
npm install --save @foundation-base/calendar-date-picker
License
MIT © lijoejohn