0.2.0 • Published 2 years ago
react-date-dropdown v0.2.0
Welcome to react-date-dropdown 👋
Install
npm install react-date-dropdown
yarn add react-date-dropdown
DateDropdown
interface IDateDropdown {
/** Required. Callback for date change: Format: YYYY-MM-DD */
onDateChange: (date: string) => void;
/** Default Date set: Format: YYYY-MM-DD */
defaultDate?: string;
/** ClassName */
className?: {
container?: string;
select?: string;
option?: string;
};
/** Styles */
styles?: {
container?: React.CSSProperties;
select?: React.CSSProperties;
option?: React.CSSProperties;
};
/** Placeholder for <select/> input */
selectPlaceholder?: {
year: string;
month: string;
day: string;
};
/** Starting year: Format: YYYY */
yearStart?: number;
/** Ending year: Format: YYYY */
yearEnd?: number;
}
import DateDropdownPicker from 'react-date-dropdown';
<DateDr
YearPicker
interface IYearPicker {
/** Required. Callback for year change: Format: YYYY */
onYearChange: (year: number) => void;
/** Default year: Format: YYYY */
selectedYear?: number;
/** Placeholder for <select/> input */
placeholder?: string;
/** Starting year: Format: YYYY */
start?: number;
/** Ending year: Format: YYYY */
end?: number;
/** ClassName */
className?: {
select?: string;
option?: string;
};
/** Styles */
styles?: {
select?: React.CSSProperties;
option?: React.CSSProperties;
};
}
import {YearPicker} from 'react-date-dropdown';
<YearPicker
onYearChange={() => {}}
/>
MonthPicker
interface IMonthPicker {
/** Required. Callback for month change: Format: MM */
onMonthChange: (month: number) => void;
/** Default year: Format: MM */
selectedMonth?: number;
/** Placeholder for <select/> input */
placeholder?: string;
/** ClassName */
className?: {
select?: string;
option?: string;
};
/** Styles */
styles?: {
select?: React.CSSProperties;
option?: React.CSSProperties;
};
}
import {MonthPicker} from 'react-date-dropdown';
<MonthPicker
onMonthChange={() => {}}
/>
DayPicker
interface IDayPicker {
/** Required. Callback for day change: Format: DD */
onDayChange: (day: number) => void;
/** Default year - 1991. Used to calculate number of days */
year?: number;
/** Default month - 1. Used to calculate number of days*/
month?: number;
/** Default day */
day?: number;
/** Placeholder for <select/> input */
placeholder?: string;
/** ClassName */
className?: {
select?: string;
option?: string;
};
/** Styles */
styles?: {
select?: React.CSSProperties;
option?: React.CSSProperties;
};
}
import {DayPicker} from 'react-date-dropdown';
<DayPicker
onDayChange={() => {}}
/>
Show your support
Give a ⭐️ if this project helped you!
0.2.0
2 years ago
0.1.2
2 years ago
0.0.11
2 years ago
0.0.12
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.1.0
2 years ago
0.1.1
2 years ago
0.0.15
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago