date-picker-from-gldvsky
v1.0.21
Published
A date-picker package.
Readme
Date Picker
A simple date picker component for your React app.
Demo
Installation
npm install date-picker-from-gldvskyor
yarn add date-picker-from-gldvskyUsage
Import the DatePicker components:
import { DatePicker } from 'date-picker-from-gldvsky'And use it in your React project:
import { DatePicker } from 'date-picker-from-gldvsky';
const SomeComponent = () => {
const configuration = {
view: 'month',
startOfWeek: 'Mo',
startDateRange: '01/03/2024',
endDateRange: '20/03/2024',
minDate: new Date(2024, 1, 1),
maxDate: new Date(2025, 6, 1),
withWeekends: true,
selected: new Date(2024, 3, 15)
}
return (
<div>
<DatePicker {...configuration}/>
</div>
);
}
Props
| Prop | Type | Description |
|------------------|-------------------------------|-------------------------------------------------------------------------------|
| view | 'year' \| 'month' \| 'week' | Types of calendar view: year, month, week |
| startOfWeek | 'Mo' \| 'Su' | Beginning of the week |
| startDateRange | string | Set the initial value for the start of the range in the format - 'DD/MM/YYYY' |
| endDateRange | string | Set the initial value for the end of the range in the format - 'DD/MM/YYYY' |
| minDate | Date | Set the minimum possible date for the calendar |
| maxDate | Date | Set the maximum possible date for the calendar |
| withWeekends | boolean | Enable/disable the display of the calendar with weekends |
| selected | Date | Set the initial value for selected date |
