react-dropdown-date 2.2.6 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/package.json +1 -1
- package/dist/date-dropdown.component.d.ts +0 -88
- package/dist/day-picker.component.d.ts +0 -23
- package/dist/helper.d.ts +0 -34
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -434
- package/dist/index.js.map +0 -1
- package/dist/month-picker.component.d.ts +0 -25
- package/dist/year-picker.component.d.ts +0 -23
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ Highly customizable react based date picker. Select date from Day, Month and Yea
|
|
|
6
6
|
|
|
7
7
|
https://www.npmjs.com/package/react-dropdown-date
|
|
8
8
|
|
|
9
|
+
## [Demo Link](https://codesandbox.io/s/react-dropdown-date-demo-gbm2k)
|
|
10
|
+
https://codesandbox.io/s/react-dropdown-date-demo-gbm2k
|
|
11
|
+
|
|
12
|
+
|
|
9
13
|
## `Date` component, with combined functionality
|
|
10
14
|
see further below for individual components
|
|
11
15
|
```
|
|
@@ -21,7 +25,7 @@ const formatDate = (date) => { // formats a JS date to 'yyyy-mm-dd'
|
|
|
21
25
|
if (month.length < 2) month = '0' + month;
|
|
22
26
|
if (day.length < 2) day = '0' + day;
|
|
23
27
|
|
|
24
|
-
return [year, month, day].join('-');
|
|
28
|
+
return [year, month, day].join('-').replace(/-/g, '/') ;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
class App extends Component {
|
|
@@ -222,4 +226,4 @@ class App extends Component {
|
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
export default App;
|
|
225
|
-
```
|
|
229
|
+
```
|
package/package.json
CHANGED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare enum DropdownComponent {
|
|
3
|
-
year = "year",
|
|
4
|
-
month = "month",
|
|
5
|
-
day = "day"
|
|
6
|
-
}
|
|
7
|
-
interface IProps {
|
|
8
|
-
startDate?: string;
|
|
9
|
-
endDate?: string;
|
|
10
|
-
selectedDate?: string;
|
|
11
|
-
order?: DropdownComponent[];
|
|
12
|
-
onMonthChange?: Function;
|
|
13
|
-
onDayChange?: Function;
|
|
14
|
-
onYearChange?: Function;
|
|
15
|
-
onDateChange?: Function;
|
|
16
|
-
ids?: {
|
|
17
|
-
year?: string;
|
|
18
|
-
month?: string;
|
|
19
|
-
day?: string;
|
|
20
|
-
};
|
|
21
|
-
names?: {
|
|
22
|
-
year?: string;
|
|
23
|
-
month?: string;
|
|
24
|
-
day?: string;
|
|
25
|
-
};
|
|
26
|
-
classes?: {
|
|
27
|
-
dateContainer?: string;
|
|
28
|
-
yearContainer?: string;
|
|
29
|
-
monthContainer?: string;
|
|
30
|
-
dayContainer?: string;
|
|
31
|
-
year?: string;
|
|
32
|
-
month?: string;
|
|
33
|
-
day?: string;
|
|
34
|
-
yearOptions?: string;
|
|
35
|
-
monthOptions?: string;
|
|
36
|
-
dayOptions?: string;
|
|
37
|
-
};
|
|
38
|
-
defaultValues?: {
|
|
39
|
-
year?: string;
|
|
40
|
-
month?: string;
|
|
41
|
-
day?: string;
|
|
42
|
-
};
|
|
43
|
-
options?: {
|
|
44
|
-
yearReverse?: boolean;
|
|
45
|
-
monthShort?: boolean;
|
|
46
|
-
monthCaps?: boolean;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
interface IState {
|
|
50
|
-
startYear: number;
|
|
51
|
-
startMonth: number;
|
|
52
|
-
startDay: number;
|
|
53
|
-
endYear: number;
|
|
54
|
-
endMonth: number;
|
|
55
|
-
endDay: number;
|
|
56
|
-
selectedYear: number;
|
|
57
|
-
selectedMonth: number;
|
|
58
|
-
selectedDay: number;
|
|
59
|
-
}
|
|
60
|
-
export declare class DropdownDate extends React.Component<IProps, IState> {
|
|
61
|
-
renderParts: any;
|
|
62
|
-
constructor(props: IProps);
|
|
63
|
-
static getDerivedStateFromProps(nextProps: IProps, prevState: IState): {
|
|
64
|
-
selectedYear: number;
|
|
65
|
-
selectedMonth?: undefined;
|
|
66
|
-
selectedDay?: undefined;
|
|
67
|
-
} | {
|
|
68
|
-
selectedMonth: number;
|
|
69
|
-
selectedYear?: undefined;
|
|
70
|
-
selectedDay?: undefined;
|
|
71
|
-
} | {
|
|
72
|
-
selectedDay: number;
|
|
73
|
-
selectedYear?: undefined;
|
|
74
|
-
selectedMonth?: undefined;
|
|
75
|
-
} | null;
|
|
76
|
-
generateYearOptions(): JSX.Element[];
|
|
77
|
-
generateMonthOptions(): JSX.Element[];
|
|
78
|
-
generateDayOptions(): JSX.Element[];
|
|
79
|
-
handleDateChange: (type: DropdownComponent, value: number) => void;
|
|
80
|
-
handleYearChange: (e: any) => void;
|
|
81
|
-
handleMonthChange: (e: any) => void;
|
|
82
|
-
handleDayChange: (e: any) => void;
|
|
83
|
-
renderYear: () => JSX.Element;
|
|
84
|
-
renderMonth: () => JSX.Element;
|
|
85
|
-
renderDay: () => JSX.Element;
|
|
86
|
-
render: () => JSX.Element;
|
|
87
|
-
}
|
|
88
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
year: number;
|
|
4
|
-
month: number;
|
|
5
|
-
value: number;
|
|
6
|
-
onChange: Function;
|
|
7
|
-
id?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
defaultValue?: string;
|
|
10
|
-
endYearGiven?: boolean;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
classes?: string;
|
|
14
|
-
optionClasses?: string;
|
|
15
|
-
}
|
|
16
|
-
interface IState {
|
|
17
|
-
}
|
|
18
|
-
export declare class DayPicker extends React.Component<IProps, IState> {
|
|
19
|
-
renderDayOptions: () => JSX.Element[];
|
|
20
|
-
handleSelectionChange: (e: any) => any;
|
|
21
|
-
render: () => JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
package/dist/helper.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const monthByNumber: {
|
|
2
|
-
0: string;
|
|
3
|
-
1: string;
|
|
4
|
-
2: string;
|
|
5
|
-
3: string;
|
|
6
|
-
4: string;
|
|
7
|
-
5: string;
|
|
8
|
-
6: string;
|
|
9
|
-
7: string;
|
|
10
|
-
8: string;
|
|
11
|
-
9: string;
|
|
12
|
-
10: string;
|
|
13
|
-
11: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const numberByMonth: {
|
|
16
|
-
January: number;
|
|
17
|
-
February: number;
|
|
18
|
-
March: number;
|
|
19
|
-
April: number;
|
|
20
|
-
May: number;
|
|
21
|
-
June: number;
|
|
22
|
-
July: number;
|
|
23
|
-
August: number;
|
|
24
|
-
September: number;
|
|
25
|
-
October: number;
|
|
26
|
-
November: number;
|
|
27
|
-
December: number;
|
|
28
|
-
};
|
|
29
|
-
export declare const unit: {
|
|
30
|
-
day: string;
|
|
31
|
-
month: string;
|
|
32
|
-
year: string;
|
|
33
|
-
};
|
|
34
|
-
export declare const getDaysInMonth: (year: number, month: number) => number;
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
/*! *****************************************************************************
|
|
6
|
-
Copyright (c) Microsoft Corporation.
|
|
7
|
-
|
|
8
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
-
purpose with or without fee is hereby granted.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
***************************************************************************** */
|
|
19
|
-
/* global Reflect, Promise */
|
|
20
|
-
|
|
21
|
-
var extendStatics = function(d, b) {
|
|
22
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
24
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
25
|
-
return extendStatics(d, b);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
function __extends(d, b) {
|
|
29
|
-
extendStatics(d, b);
|
|
30
|
-
function __() { this.constructor = d; }
|
|
31
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var YearPicker = /** @class */ (function (_super) {
|
|
35
|
-
__extends(YearPicker, _super);
|
|
36
|
-
function YearPicker() {
|
|
37
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
38
|
-
_this.renderYearOptions = function () {
|
|
39
|
-
var _a = _this.props, start = _a.start, end = _a.end, reverse = _a.reverse, optionClasses = _a.optionClasses, defaultValue = _a.defaultValue;
|
|
40
|
-
var startYear = start || 1900;
|
|
41
|
-
var endYear = end || new Date().getFullYear();
|
|
42
|
-
var years = [];
|
|
43
|
-
if (startYear <= endYear) {
|
|
44
|
-
for (var i = startYear; i <= endYear; ++i) {
|
|
45
|
-
years.push(i);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
for (var i = endYear; i >= startYear; --i) {
|
|
50
|
-
years.push(i);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (reverse) {
|
|
54
|
-
years.reverse();
|
|
55
|
-
}
|
|
56
|
-
var yearOptions = [];
|
|
57
|
-
yearOptions.push(React.createElement("option", { value: "", key: -1, className: optionClasses }, defaultValue ? defaultValue : ''));
|
|
58
|
-
years.forEach(function (year, index) {
|
|
59
|
-
yearOptions.push(React.createElement("option", { value: year, key: index, className: optionClasses }, year));
|
|
60
|
-
});
|
|
61
|
-
return yearOptions;
|
|
62
|
-
};
|
|
63
|
-
_this.handleSelectionChange = function (e) { return _this.props.onChange(e.target.value); };
|
|
64
|
-
_this.render = function () {
|
|
65
|
-
var _a = _this.props, id = _a.id, name = _a.name, classes = _a.classes, required = _a.required, disabled = _a.disabled, value = _a.value;
|
|
66
|
-
return (React.createElement("select", { id: id, name: name, className: classes, required: required === true, disabled: disabled === true, onChange: _this.handleSelectionChange, value: value }, _this.renderYearOptions()));
|
|
67
|
-
};
|
|
68
|
-
return _this;
|
|
69
|
-
}
|
|
70
|
-
return YearPicker;
|
|
71
|
-
}(React.Component));
|
|
72
|
-
|
|
73
|
-
var monthByNumber = {
|
|
74
|
-
0: 'January',
|
|
75
|
-
1: 'February',
|
|
76
|
-
2: 'March',
|
|
77
|
-
3: 'April',
|
|
78
|
-
4: 'May',
|
|
79
|
-
5: 'June',
|
|
80
|
-
6: 'July',
|
|
81
|
-
7: 'August',
|
|
82
|
-
8: 'September',
|
|
83
|
-
9: 'October',
|
|
84
|
-
10: 'November',
|
|
85
|
-
11: 'December'
|
|
86
|
-
};
|
|
87
|
-
var getDaysInMonth = function (year, month) {
|
|
88
|
-
year = +(year);
|
|
89
|
-
month = +(month) + 1;
|
|
90
|
-
return new Date(year, month, 0).getDate();
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
var MonthPicker = /** @class */ (function (_super) {
|
|
94
|
-
__extends(MonthPicker, _super);
|
|
95
|
-
function MonthPicker() {
|
|
96
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
97
|
-
_this.renderMonthOptions = function () {
|
|
98
|
-
var _a = _this.props, endYearGiven = _a.endYearGiven, year = _a.year, numeric = _a.numeric, caps = _a.caps, short = _a.short, optionClasses = _a.optionClasses, defaultValue = _a.defaultValue;
|
|
99
|
-
var today = new Date();
|
|
100
|
-
var months = [];
|
|
101
|
-
var month = 11;
|
|
102
|
-
if (!endYearGiven) {
|
|
103
|
-
if (year && parseInt(year.toString()) === today.getFullYear()) {
|
|
104
|
-
month = today.getMonth();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (numeric) {
|
|
108
|
-
for (var i = 0; i <= month; ++i) {
|
|
109
|
-
months.push((i + 1).toString());
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
for (var i = 0; i <= month; ++i) {
|
|
114
|
-
months.push(monthByNumber[i]);
|
|
115
|
-
}
|
|
116
|
-
if (caps) {
|
|
117
|
-
months = months.map(function (month) { return month.toUpperCase(); });
|
|
118
|
-
}
|
|
119
|
-
if (short) {
|
|
120
|
-
months = months.map(function (month) { return month.substring(0, 3); });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
var monthOptions = [];
|
|
124
|
-
monthOptions.push(React.createElement("option", { value: "", key: -1, className: optionClasses }, defaultValue ? defaultValue : ''));
|
|
125
|
-
months.forEach(function (month, index) {
|
|
126
|
-
monthOptions.push(React.createElement("option", { value: index, key: index, className: optionClasses }, month));
|
|
127
|
-
});
|
|
128
|
-
return monthOptions;
|
|
129
|
-
};
|
|
130
|
-
_this.handleSelectionChange = function (e) { return _this.props.onChange(e.target.value); };
|
|
131
|
-
_this.render = function () {
|
|
132
|
-
var _a = _this.props, id = _a.id, name = _a.name, classes = _a.classes, required = _a.required, disabled = _a.disabled, value = _a.value;
|
|
133
|
-
return (React.createElement("select", { id: id, name: name, className: classes, required: required === true, disabled: disabled === true, value: value, onChange: _this.handleSelectionChange }, _this.renderMonthOptions()));
|
|
134
|
-
};
|
|
135
|
-
return _this;
|
|
136
|
-
}
|
|
137
|
-
return MonthPicker;
|
|
138
|
-
}(React.Component));
|
|
139
|
-
|
|
140
|
-
var DayPicker = /** @class */ (function (_super) {
|
|
141
|
-
__extends(DayPicker, _super);
|
|
142
|
-
function DayPicker() {
|
|
143
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
144
|
-
_this.renderDayOptions = function () {
|
|
145
|
-
var _a = _this.props, month = _a.month, year = _a.year, endYearGiven = _a.endYearGiven, optionClasses = _a.optionClasses, defaultValue = _a.defaultValue;
|
|
146
|
-
console.log(year, month);
|
|
147
|
-
var days = month ? getDaysInMonth(year, month) : 31;
|
|
148
|
-
console.log(days);
|
|
149
|
-
var today = new Date();
|
|
150
|
-
if (!endYearGiven) {
|
|
151
|
-
if (year === today.getFullYear() && month === today.getMonth()) {
|
|
152
|
-
days = today.getDate();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
var dayOptions = [];
|
|
156
|
-
dayOptions.push(React.createElement("option", { value: "", key: -1, className: optionClasses }, defaultValue ? defaultValue : ''));
|
|
157
|
-
for (var i = 1; i <= days; ++i) {
|
|
158
|
-
dayOptions.push(React.createElement("option", { value: i, key: i, className: optionClasses }, i));
|
|
159
|
-
}
|
|
160
|
-
return dayOptions;
|
|
161
|
-
};
|
|
162
|
-
_this.handleSelectionChange = function (e) { return _this.props.onChange(e.target.value); };
|
|
163
|
-
_this.render = function () {
|
|
164
|
-
var _a = _this.props, id = _a.id, name = _a.name, classes = _a.classes, required = _a.required, disabled = _a.disabled, value = _a.value;
|
|
165
|
-
return (React.createElement("select", { id: id, name: name, className: classes, onChange: _this.handleSelectionChange, required: required === true, disabled: disabled === true, value: value }, _this.renderDayOptions()));
|
|
166
|
-
};
|
|
167
|
-
return _this;
|
|
168
|
-
}
|
|
169
|
-
return DayPicker;
|
|
170
|
-
}(React.Component));
|
|
171
|
-
|
|
172
|
-
(function (DropdownComponent) {
|
|
173
|
-
DropdownComponent["year"] = "year";
|
|
174
|
-
DropdownComponent["month"] = "month";
|
|
175
|
-
DropdownComponent["day"] = "day";
|
|
176
|
-
})(exports.DropdownComponent || (exports.DropdownComponent = {}));
|
|
177
|
-
var DropdownDate = /** @class */ (function (_super) {
|
|
178
|
-
__extends(DropdownDate, _super);
|
|
179
|
-
function DropdownDate(props) {
|
|
180
|
-
var _this = _super.call(this, props) || this;
|
|
181
|
-
_this.handleDateChange = function (type, value) {
|
|
182
|
-
if (_this.props.onDateChange) {
|
|
183
|
-
var _a = _this.state, selectedYear = _a.selectedYear, selectedMonth = _a.selectedMonth, selectedDay = _a.selectedDay;
|
|
184
|
-
if (type === exports.DropdownComponent.year) {
|
|
185
|
-
selectedYear = value;
|
|
186
|
-
}
|
|
187
|
-
else if (type === exports.DropdownComponent.month) {
|
|
188
|
-
selectedMonth = value;
|
|
189
|
-
}
|
|
190
|
-
else if (type === exports.DropdownComponent.day) {
|
|
191
|
-
selectedDay = value;
|
|
192
|
-
}
|
|
193
|
-
if (selectedYear !== -1 && selectedMonth !== -1 && selectedDay !== -1) {
|
|
194
|
-
_this.props.onDateChange(new Date(selectedYear, selectedMonth, selectedDay));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
_this.handleYearChange = function (e) {
|
|
199
|
-
var year = parseInt(e.target.value);
|
|
200
|
-
_this.setState({ selectedYear: year });
|
|
201
|
-
if (_this.props.onYearChange) {
|
|
202
|
-
_this.props.onYearChange(year);
|
|
203
|
-
}
|
|
204
|
-
_this.handleDateChange(exports.DropdownComponent.year, year);
|
|
205
|
-
};
|
|
206
|
-
_this.handleMonthChange = function (e) {
|
|
207
|
-
var month = parseInt(e.target.value);
|
|
208
|
-
_this.setState({ selectedMonth: month });
|
|
209
|
-
if (_this.props.onMonthChange) {
|
|
210
|
-
_this.props.onMonthChange(monthByNumber[month]);
|
|
211
|
-
}
|
|
212
|
-
_this.handleDateChange(exports.DropdownComponent.month, month);
|
|
213
|
-
};
|
|
214
|
-
_this.handleDayChange = function (e) {
|
|
215
|
-
var day = parseInt(e.target.value);
|
|
216
|
-
_this.setState({ selectedDay: day });
|
|
217
|
-
if (_this.props.onDayChange) {
|
|
218
|
-
_this.props.onDayChange(day);
|
|
219
|
-
}
|
|
220
|
-
_this.handleDateChange(exports.DropdownComponent.day, day);
|
|
221
|
-
};
|
|
222
|
-
_this.renderYear = function () {
|
|
223
|
-
var _a = _this.props, classes = _a.classes, ids = _a.ids, names = _a.names;
|
|
224
|
-
return (React.createElement("div", { key: "year", id: "dropdown-year", className: (classes && classes.yearContainer) ? classes.yearContainer : undefined },
|
|
225
|
-
React.createElement("select", { id: (ids && ids.year) ? ids.year : undefined, name: (names && names.year) ? names.year : undefined, className: (classes && classes.year) ? classes.year : undefined, onChange: _this.handleYearChange, value: _this.state.selectedYear }, _this.generateYearOptions())));
|
|
226
|
-
};
|
|
227
|
-
_this.renderMonth = function () {
|
|
228
|
-
var _a = _this.props, classes = _a.classes, ids = _a.ids, names = _a.names;
|
|
229
|
-
return (React.createElement("div", { key: "month", id: "dropdown-month", className: (classes && classes.monthContainer) ? classes.monthContainer : undefined },
|
|
230
|
-
React.createElement("select", { id: (ids && ids.month) ? ids.month : undefined, name: (names && names.month) ? names.month : undefined, className: (classes && classes.month) ? classes.month : undefined, onChange: _this.handleMonthChange, value: _this.state.selectedMonth }, _this.generateMonthOptions())));
|
|
231
|
-
};
|
|
232
|
-
_this.renderDay = function () {
|
|
233
|
-
var _a = _this.props, classes = _a.classes, ids = _a.ids, names = _a.names;
|
|
234
|
-
return (React.createElement("div", { key: "day", id: "dropdown-day", className: (classes && classes.dayContainer) ? classes.dayContainer : undefined },
|
|
235
|
-
React.createElement("select", { id: (ids && ids.day) ? ids.day : undefined, name: (names && names.day) ? names.day : undefined, className: (classes && classes.day) ? classes.day : undefined, onChange: _this.handleDayChange, value: _this.state.selectedDay }, _this.generateDayOptions())));
|
|
236
|
-
};
|
|
237
|
-
_this.render = function () {
|
|
238
|
-
var classes = _this.props.classes;
|
|
239
|
-
var order = _this.props.order;
|
|
240
|
-
order = order || [exports.DropdownComponent.year, exports.DropdownComponent.month, exports.DropdownComponent.day];
|
|
241
|
-
return (React.createElement("div", { id: "dropdown-date", className: (classes && classes.dateContainer) ? classes.dateContainer : undefined }, order.map(function (part) {
|
|
242
|
-
return _this.renderParts[part]();
|
|
243
|
-
})));
|
|
244
|
-
};
|
|
245
|
-
var startDate = props.startDate, endDate = props.endDate, selectedDate = props.selectedDate;
|
|
246
|
-
var sDate = startDate ? new Date(startDate) : new Date('1900-01-01');
|
|
247
|
-
var eDate = endDate ? new Date(endDate) : new Date();
|
|
248
|
-
var selDate = selectedDate ? new Date(selectedDate) : null;
|
|
249
|
-
_this.state = {
|
|
250
|
-
startYear: sDate.getFullYear(),
|
|
251
|
-
startMonth: sDate.getMonth(),
|
|
252
|
-
startDay: sDate.getDate(),
|
|
253
|
-
endYear: eDate.getFullYear(),
|
|
254
|
-
endMonth: eDate.getMonth(),
|
|
255
|
-
endDay: eDate.getDate(),
|
|
256
|
-
selectedYear: selDate ? selDate.getFullYear() : -1,
|
|
257
|
-
selectedMonth: selDate ? selDate.getMonth() : -1,
|
|
258
|
-
selectedDay: selDate ? selDate.getDate() : -1
|
|
259
|
-
};
|
|
260
|
-
_this.renderParts = {
|
|
261
|
-
year: _this.renderYear,
|
|
262
|
-
month: _this.renderMonth,
|
|
263
|
-
day: _this.renderDay,
|
|
264
|
-
};
|
|
265
|
-
return _this;
|
|
266
|
-
}
|
|
267
|
-
DropdownDate.getDerivedStateFromProps = function (nextProps, prevState) {
|
|
268
|
-
var selDate = nextProps.selectedDate ? new Date(nextProps.selectedDate) : null;
|
|
269
|
-
var tempSelDate = {
|
|
270
|
-
selectedYear: selDate ? selDate.getFullYear() : -1,
|
|
271
|
-
selectedMonth: selDate ? selDate.getMonth() : -1,
|
|
272
|
-
selectedDay: selDate ? selDate.getDate() : -1
|
|
273
|
-
};
|
|
274
|
-
if (tempSelDate.selectedYear !== prevState.selectedYear) {
|
|
275
|
-
return { selectedYear: tempSelDate.selectedYear };
|
|
276
|
-
}
|
|
277
|
-
if (tempSelDate.selectedMonth !== prevState.selectedMonth) {
|
|
278
|
-
return { selectedMonth: tempSelDate.selectedMonth };
|
|
279
|
-
}
|
|
280
|
-
if (tempSelDate.selectedDay !== prevState.selectedDay) {
|
|
281
|
-
return { selectedDay: tempSelDate.selectedDay };
|
|
282
|
-
}
|
|
283
|
-
return null;
|
|
284
|
-
};
|
|
285
|
-
DropdownDate.prototype.generateYearOptions = function () {
|
|
286
|
-
var _a = this.props, classes = _a.classes, options = _a.options, defaultValues = _a.defaultValues;
|
|
287
|
-
var _b = this.state, startYear = _b.startYear, endYear = _b.endYear;
|
|
288
|
-
var yearOptions = [];
|
|
289
|
-
yearOptions.push(React.createElement("option", { key: -1, value: "-1", className: (classes && classes.yearOptions) ? classes.yearOptions : undefined }, (defaultValues && defaultValues.year) ? defaultValues.year : ''));
|
|
290
|
-
if (options && options.yearReverse) {
|
|
291
|
-
for (var i = endYear; i >= startYear; i--) {
|
|
292
|
-
yearOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.yearOptions) ? classes.yearOptions : undefined }, i));
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
for (var i = startYear; i <= endYear; i++) {
|
|
297
|
-
yearOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.yearOptions) ? classes.yearOptions : undefined }, i));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return yearOptions;
|
|
301
|
-
};
|
|
302
|
-
DropdownDate.prototype.generateMonthOptions = function () {
|
|
303
|
-
var _a = this.props, classes = _a.classes, options = _a.options, defaultValues = _a.defaultValues;
|
|
304
|
-
var _b = this.state, startMonth = _b.startMonth, endMonth = _b.endMonth, startYear = _b.startYear, endYear = _b.endYear, selectedYear = _b.selectedYear;
|
|
305
|
-
var months = [];
|
|
306
|
-
if (selectedYear === startYear && selectedYear === endYear) {
|
|
307
|
-
for (var i = startMonth; i <= endMonth; i++) {
|
|
308
|
-
months.push({
|
|
309
|
-
value: i,
|
|
310
|
-
month: monthByNumber[i]
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
else if (selectedYear === startYear) {
|
|
315
|
-
for (var i = startMonth; i <= 11; i++) {
|
|
316
|
-
months.push({
|
|
317
|
-
value: i,
|
|
318
|
-
month: monthByNumber[i]
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
else if (selectedYear === endYear) {
|
|
323
|
-
for (var i = 0; i <= endMonth; i++) {
|
|
324
|
-
months.push({
|
|
325
|
-
value: i,
|
|
326
|
-
month: monthByNumber[i]
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
for (var i = 0; i <= 11; i++) {
|
|
332
|
-
months.push({
|
|
333
|
-
value: i,
|
|
334
|
-
month: monthByNumber[i]
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
if (options && options.monthShort) {
|
|
339
|
-
months = months.map(function (elem) {
|
|
340
|
-
return {
|
|
341
|
-
value: elem.value,
|
|
342
|
-
month: elem.month.substring(0, 3)
|
|
343
|
-
};
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
if (options && options.monthCaps) {
|
|
347
|
-
months = months.map(function (elem) {
|
|
348
|
-
return {
|
|
349
|
-
value: elem.value,
|
|
350
|
-
month: elem.month.toUpperCase()
|
|
351
|
-
};
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
var monthOptions = [];
|
|
355
|
-
monthOptions.push(React.createElement("option", { key: -1, value: "-1", className: (classes && classes.monthOptions) ? classes.monthOptions : undefined }, (defaultValues && defaultValues.month) ? defaultValues.month : ''));
|
|
356
|
-
months.forEach(function (elem) {
|
|
357
|
-
monthOptions.push(React.createElement("option", { key: elem.value, value: elem.value, className: (classes && classes.monthOptions) ? classes.monthOptions : undefined }, elem.month));
|
|
358
|
-
});
|
|
359
|
-
return monthOptions;
|
|
360
|
-
};
|
|
361
|
-
DropdownDate.prototype.generateDayOptions = function () {
|
|
362
|
-
var _a = this.props, classes = _a.classes, defaultValues = _a.defaultValues;
|
|
363
|
-
var _b = this.state, startYear = _b.startYear, startMonth = _b.startMonth, startDay = _b.startDay, endYear = _b.endYear, endMonth = _b.endMonth, endDay = _b.endDay, selectedYear = _b.selectedYear, selectedMonth = _b.selectedMonth;
|
|
364
|
-
var dayOptions = [];
|
|
365
|
-
dayOptions.push(React.createElement("option", { key: -1, value: "-1", className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, (defaultValues && defaultValues.day) ? defaultValues.day : ''));
|
|
366
|
-
var monthDays = getDaysInMonth(selectedYear, selectedMonth);
|
|
367
|
-
if (selectedYear === startYear && selectedYear === endYear) {
|
|
368
|
-
if (selectedMonth === startMonth && selectedMonth === endMonth) {
|
|
369
|
-
for (var i = startDay; i <= endDay; i++) {
|
|
370
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
else if (selectedMonth === startMonth) {
|
|
374
|
-
for (var i = startDay; i <= monthDays; i++) {
|
|
375
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
else if (selectedMonth === endMonth) {
|
|
379
|
-
for (var i = 1; i <= endDay; i++) {
|
|
380
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
for (var i = 1; i <= monthDays; i++) {
|
|
385
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
else if (selectedYear === startYear) {
|
|
390
|
-
if (selectedMonth === startMonth) {
|
|
391
|
-
for (var i = startDay; i <= monthDays; i++) {
|
|
392
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
for (var i = 1; i <= monthDays; i++) {
|
|
397
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
else if (selectedYear === endYear) {
|
|
402
|
-
if (selectedMonth === endMonth) {
|
|
403
|
-
for (var i = 1; i <= endDay; i++) {
|
|
404
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
408
|
-
for (var i = 1; i <= monthDays; i++) {
|
|
409
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
if (selectedMonth) {
|
|
415
|
-
for (var i = 1; i <= monthDays; i++) {
|
|
416
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
else {
|
|
420
|
-
for (var i = 1; i <= 31; i++) {
|
|
421
|
-
dayOptions.push(React.createElement("option", { key: i, value: i, className: (classes && classes.dayOptions) ? classes.dayOptions : undefined }, i));
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
return dayOptions;
|
|
426
|
-
};
|
|
427
|
-
return DropdownDate;
|
|
428
|
-
}(React.Component));
|
|
429
|
-
|
|
430
|
-
exports.DayPicker = DayPicker;
|
|
431
|
-
exports.DropdownDate = DropdownDate;
|
|
432
|
-
exports.MonthPicker = MonthPicker;
|
|
433
|
-
exports.YearPicker = YearPicker;
|
|
434
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/year-picker.component.tsx","../src/helper.ts","../src/month-picker.component.tsx","../src/day-picker.component.tsx","../src/date-dropdown.component.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\ninterface IProps {\r\n value: number;\r\n onChange: Function;\r\n id?: string;\r\n name?: string;\r\n defaultValue?: string;\r\n start?: number;\r\n end?: number;\r\n reverse?: boolean;\r\n required?: boolean;\r\n disabled?: boolean;\r\n classes?: string;\r\n optionClasses?: string;\r\n}\r\n\r\ninterface IState {\r\n\r\n}\r\n\r\nexport class YearPicker extends React.Component<IProps, IState> {\r\n\r\n renderYearOptions = () => {\r\n const { start, end, reverse, optionClasses, defaultValue } = this.props;\r\n const startYear = start || 1900;\r\n const endYear = end || new Date().getFullYear();\r\n\r\n const years = [];\r\n if (startYear <= endYear) {\r\n for (let i = startYear; i <= endYear; ++i) {\r\n years.push(i);\r\n }\r\n } else {\r\n for (let i = endYear; i >= startYear; --i) {\r\n years.push(i);\r\n }\r\n }\r\n if (reverse) {\r\n years.reverse();\r\n }\r\n const yearOptions = [];\r\n yearOptions.push(\r\n <option\r\n value=\"\"\r\n key={-1}\r\n className={optionClasses}\r\n >\r\n {defaultValue ? defaultValue : ''}\r\n </option>\r\n );\r\n years.forEach((year, index) => {\r\n yearOptions.push(\r\n <option\r\n value={year}\r\n key={index}\r\n className={optionClasses}\r\n >\r\n {year}\r\n </option>\r\n );\r\n });\r\n return yearOptions;\r\n }\r\n\r\n handleSelectionChange = (e: any) => this.props.onChange(e.target.value);\r\n\r\n render = () => {\r\n const { id, name, classes, required, disabled, value } = this.props;\r\n return (\r\n <select\r\n id={id}\r\n name={name}\r\n className={classes}\r\n required={required === true}\r\n disabled={disabled === true}\r\n onChange={this.handleSelectionChange}\r\n value={value}\r\n >\r\n {this.renderYearOptions()}\r\n </select>\r\n );\r\n }\r\n}\r\n","export const monthByNumber = {\r\n 0: 'January',\r\n 1: 'February',\r\n 2: 'March',\r\n 3: 'April',\r\n 4: 'May',\r\n 5: 'June',\r\n 6: 'July',\r\n 7: 'August',\r\n 8: 'September',\r\n 9: 'October',\r\n 10: 'November',\r\n 11: 'December'\r\n};\r\n\r\nexport const numberByMonth = {\r\n January: 0,\r\n February: 1,\r\n March: 2,\r\n April: 3,\r\n May: 4,\r\n June: 5,\r\n July: 6,\r\n August: 7,\r\n September: 8,\r\n October: 9,\r\n November: 10,\r\n December: 11\r\n};\r\n\r\nexport const unit = {\r\n day: 'day',\r\n month: 'month',\r\n year: 'year'\r\n};\r\n\r\nexport const getDaysInMonth = (year: number, month: number): number => {\r\n year = +(year);\r\n month = +(month) + 1;\r\n return new Date(year, month, 0).getDate();\r\n};\r\n","import * as React from 'react';\r\nimport { monthByNumber } from './helper';\r\n\r\ninterface IProps {\r\n year: number;\r\n value: number;\r\n onChange: Function;\r\n defaultValue?: string\r\n numeric?: boolean;\r\n short?: boolean;\r\n caps?: boolean;\r\n endYearGiven?: boolean;\r\n required?: boolean;\r\n disabled?: boolean;\r\n id?: string;\r\n name?: string;\r\n classes?: string;\r\n optionClasses?: string;\r\n}\r\n\r\ninterface IState {\r\n\r\n}\r\n\r\nexport class MonthPicker extends React.Component<IProps, IState> {\r\n\r\n renderMonthOptions = () => {\r\n const { endYearGiven, year, numeric, caps, short, optionClasses, defaultValue } = this.props;\r\n const today = new Date();\r\n let months = [];\r\n let month = 11;\r\n if (!endYearGiven) {\r\n if (year && parseInt(year.toString()) === today.getFullYear()) {\r\n month = today.getMonth();\r\n }\r\n }\r\n if (numeric) {\r\n for (let i = 0; i <= month; ++i) {\r\n months.push((i + 1).toString());\r\n }\r\n } else {\r\n for (let i = 0; i <= month; ++i) {\r\n months.push(monthByNumber[i]);\r\n }\r\n if (caps) {\r\n months = months.map((month) => { return month.toUpperCase(); });\r\n }\r\n if (short) {\r\n months = months.map((month) => { return month.substring(0, 3); });\r\n }\r\n }\r\n const monthOptions = [];\r\n monthOptions.push(\r\n <option\r\n value=\"\"\r\n key={-1}\r\n className={optionClasses}\r\n >\r\n {defaultValue ? defaultValue : ''}\r\n </option>\r\n );\r\n months.forEach((month, index) => {\r\n monthOptions.push(\r\n <option\r\n value={index}\r\n key={index}\r\n className={optionClasses}\r\n >\r\n {month}\r\n </option>\r\n );\r\n });\r\n return monthOptions;\r\n }\r\n\r\n handleSelectionChange = (e: any) => this.props.onChange(e.target.value);\r\n\r\n render = () => {\r\n const { id, name, classes, required, disabled, value } = this.props;\r\n return (\r\n <select\r\n id={id}\r\n name={name}\r\n className={classes}\r\n required={required === true}\r\n disabled={disabled === true}\r\n value={value}\r\n onChange={this.handleSelectionChange}\r\n >\r\n {this.renderMonthOptions()}\r\n </select>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { getDaysInMonth } from './helper';\r\n\r\ninterface IProps {\r\n year: number;\r\n month: number;\r\n value: number;\r\n onChange: Function;\r\n id?: string;\r\n name?: string;\r\n defaultValue?: string;\r\n endYearGiven?: boolean;\r\n required?: boolean;\r\n disabled?: boolean;\r\n classes?: string;\r\n optionClasses?: string;\r\n}\r\n\r\ninterface IState {\r\n\r\n}\r\n\r\nexport class DayPicker extends React.Component<IProps, IState> {\r\n\r\n renderDayOptions = () => {\r\n const { month, year, endYearGiven, optionClasses, defaultValue } = this.props;\r\n\r\n console.log(year, month);\r\n let days = month ? getDaysInMonth(year, month) : 31;\r\n\r\n console.log(days);\r\n\r\n const today = new Date();\r\n if (!endYearGiven) {\r\n if (year === today.getFullYear() && month === today.getMonth()) {\r\n days = today.getDate();\r\n }\r\n }\r\n const dayOptions = [];\r\n dayOptions.push(\r\n <option\r\n value=\"\"\r\n key={-1}\r\n className={optionClasses}\r\n >\r\n {defaultValue ? defaultValue : ''}\r\n </option>\r\n );\r\n for (let i = 1; i <= days; ++i) {\r\n dayOptions.push(\r\n <option\r\n value={i}\r\n key={i}\r\n className={optionClasses}\r\n >\r\n {i}\r\n </option>\r\n );\r\n };\r\n return dayOptions;\r\n }\r\n\r\n handleSelectionChange = (e: any) => this.props.onChange(e.target.value);\r\n\r\n render = () => {\r\n const { id, name, classes, required, disabled, value } = this.props;\r\n return (\r\n <select\r\n id={id}\r\n name={name}\r\n className={classes}\r\n onChange={this.handleSelectionChange}\r\n required={required === true}\r\n disabled={disabled === true}\r\n value={value}\r\n >\r\n {this.renderDayOptions()}\r\n </select>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { monthByNumber, getDaysInMonth } from './helper';\r\n\r\nexport enum DropdownComponent {\r\n year = 'year',\r\n month = 'month',\r\n day = 'day',\r\n}\r\n\r\ninterface IProps {\r\n startDate?: string;\r\n endDate?: string;\r\n selectedDate?: string;\r\n order?: DropdownComponent[];\r\n onMonthChange?: Function;\r\n onDayChange?: Function;\r\n onYearChange?: Function;\r\n onDateChange?: Function;\r\n ids?: {\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n };\r\n names?: {\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n };\r\n classes?: {\r\n dateContainer?: string;\r\n yearContainer?: string;\r\n monthContainer?: string;\r\n dayContainer?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n yearOptions?: string;\r\n monthOptions?: string;\r\n dayOptions?: string;\r\n };\r\n defaultValues?: {\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n };\r\n options?: {\r\n yearReverse?: boolean;\r\n monthShort?: boolean;\r\n monthCaps?: boolean;\r\n };\r\n}\r\n\r\ninterface IState {\r\n startYear: number;\r\n startMonth: number;\r\n startDay: number;\r\n endYear: number;\r\n endMonth: number;\r\n endDay: number;\r\n selectedYear: number;\r\n selectedMonth: number;\r\n selectedDay: number;\r\n}\r\n\r\nexport class DropdownDate extends React.Component<IProps, IState> {\r\n\r\n renderParts: any;\r\n\r\n constructor(props: IProps) {\r\n super(props);\r\n const { startDate, endDate, selectedDate } = props;\r\n const sDate = startDate ? new Date(startDate) : new Date('1900-01-01');\r\n const eDate = endDate ? new Date(endDate) : new Date();\r\n const selDate = selectedDate ? new Date(selectedDate) : null;\r\n this.state = {\r\n startYear: sDate.getFullYear(),\r\n startMonth: sDate.getMonth(),\r\n startDay: sDate.getDate(),\r\n endYear: eDate.getFullYear(),\r\n endMonth: eDate.getMonth(),\r\n endDay: eDate.getDate(),\r\n selectedYear: selDate ? selDate.getFullYear() : -1,\r\n selectedMonth: selDate ? selDate.getMonth() : -1,\r\n selectedDay: selDate ? selDate.getDate() : -1\r\n };\r\n this.renderParts = {\r\n year: this.renderYear,\r\n month: this.renderMonth,\r\n day: this.renderDay,\r\n }\r\n }\r\n\r\n static getDerivedStateFromProps(nextProps: IProps, prevState: IState) {\r\n const selDate = nextProps.selectedDate ? new Date(nextProps.selectedDate) : null;\r\n const tempSelDate = {\r\n selectedYear: selDate ? selDate.getFullYear() : -1,\r\n selectedMonth: selDate ? selDate.getMonth() : -1,\r\n selectedDay: selDate ? selDate.getDate() : -1\r\n };\r\n if (tempSelDate.selectedYear !== prevState.selectedYear) {\r\n return { selectedYear: tempSelDate.selectedYear };\r\n }\r\n if (tempSelDate.selectedMonth !== prevState.selectedMonth) {\r\n return { selectedMonth: tempSelDate.selectedMonth };\r\n }\r\n if (tempSelDate.selectedDay !== prevState.selectedDay) {\r\n return { selectedDay: tempSelDate.selectedDay };\r\n }\r\n return null;\r\n }\r\n\r\n generateYearOptions() {\r\n const { classes, options, defaultValues } = this.props;\r\n const { startYear, endYear } = this.state;\r\n const yearOptions = [];\r\n yearOptions.push(\r\n <option\r\n key={-1}\r\n value=\"-1\"\r\n className={(classes && classes.yearOptions) ? classes.yearOptions : undefined}\r\n >\r\n {(defaultValues && defaultValues.year) ? defaultValues.year : ''}\r\n </option>\r\n );\r\n if (options && options.yearReverse) {\r\n for (let i = endYear; i >= startYear; i--) {\r\n yearOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.yearOptions) ? classes.yearOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else {\r\n for (let i = startYear; i <= endYear; i++) {\r\n yearOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.yearOptions) ? classes.yearOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n }\r\n return yearOptions;\r\n }\r\n\r\n generateMonthOptions() {\r\n const { classes, options, defaultValues } = this.props;\r\n const { startMonth, endMonth, startYear, endYear, selectedYear } = this.state;\r\n let months = [];\r\n\r\n if (selectedYear === startYear && selectedYear === endYear) {\r\n for (let i = startMonth; i <= endMonth; i++) {\r\n months.push({\r\n value: i,\r\n month: monthByNumber[i]\r\n });\r\n }\r\n } else if (selectedYear === startYear) {\r\n for (let i = startMonth; i <= 11; i++) {\r\n months.push({\r\n value: i,\r\n month: monthByNumber[i]\r\n });\r\n }\r\n } else if (selectedYear === endYear) {\r\n for (let i = 0; i <= endMonth; i++) {\r\n months.push({\r\n value: i,\r\n month: monthByNumber[i]\r\n });\r\n }\r\n } else {\r\n for (let i = 0; i <= 11; i++) {\r\n months.push({\r\n value: i,\r\n month: monthByNumber[i]\r\n });\r\n }\r\n }\r\n\r\n if (options && options.monthShort) {\r\n months = months.map((elem) => {\r\n return {\r\n value: elem.value,\r\n month: elem.month.substring(0, 3)\r\n };\r\n });\r\n }\r\n\r\n if (options && options.monthCaps) {\r\n months = months.map((elem) => {\r\n return {\r\n value: elem.value,\r\n month: elem.month.toUpperCase()\r\n };\r\n });\r\n }\r\n\r\n const monthOptions = [];\r\n monthOptions.push(\r\n <option key={-1} value=\"-1\"\r\n className={(classes && classes.monthOptions) ? classes.monthOptions : undefined}\r\n >{(defaultValues && defaultValues.month) ? defaultValues.month : ''}\r\n </option>\r\n );\r\n months.forEach((elem) => {\r\n monthOptions.push(\r\n <option key={elem.value} value={elem.value}\r\n className={(classes && classes.monthOptions) ? classes.monthOptions : undefined}\r\n >{elem.month}</option>\r\n );\r\n });\r\n\r\n return monthOptions;\r\n }\r\n\r\n generateDayOptions() {\r\n const { classes, defaultValues } = this.props;\r\n const { startYear, startMonth, startDay, endYear, endMonth, endDay, selectedYear, selectedMonth } = this.state;\r\n const dayOptions = [];\r\n dayOptions.push(\r\n <option key={-1} value=\"-1\"\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >\r\n {(defaultValues && defaultValues.day) ? defaultValues.day : ''}\r\n </option>\r\n );\r\n\r\n const monthDays = getDaysInMonth(selectedYear, selectedMonth);\r\n if (selectedYear === startYear && selectedYear === endYear) {\r\n if (selectedMonth === startMonth && selectedMonth === endMonth) {\r\n for (let i = startDay; i <= endDay; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else if (selectedMonth === startMonth) {\r\n for (let i = startDay; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else if (selectedMonth === endMonth) {\r\n for (let i = 1; i <= endDay; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else {\r\n for (let i = 1; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n }\r\n } else if (selectedYear === startYear) {\r\n if (selectedMonth === startMonth) {\r\n for (let i = startDay; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else {\r\n for (let i = 1; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n }\r\n } else if (selectedYear === endYear) {\r\n if (selectedMonth === endMonth) {\r\n for (let i = 1; i <= endDay; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else {\r\n for (let i = 1; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n }\r\n } else {\r\n if (selectedMonth) {\r\n for (let i = 1; i <= monthDays; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n } else {\r\n for (let i = 1; i <= 31; i++) {\r\n dayOptions.push(\r\n <option key={i} value={i}\r\n className={(classes && classes.dayOptions) ? classes.dayOptions : undefined}\r\n >{i}</option>\r\n );\r\n }\r\n }\r\n }\r\n return dayOptions;\r\n }\r\n\r\n handleDateChange = (type: DropdownComponent, value: number) => {\r\n if (this.props.onDateChange) {\r\n let { selectedYear, selectedMonth, selectedDay } = this.state;\r\n if (type === DropdownComponent.year) {\r\n selectedYear = value;\r\n } else if (type === DropdownComponent.month) {\r\n selectedMonth = value;\r\n } else if (type === DropdownComponent.day) {\r\n selectedDay = value;\r\n }\r\n if (selectedYear !== -1 && selectedMonth !== -1 && selectedDay !== -1) {\r\n this.props.onDateChange(new Date(selectedYear, selectedMonth, selectedDay));\r\n }\r\n }\r\n }\r\n\r\n handleYearChange = (e: any) => {\r\n const year = parseInt(e.target.value);\r\n this.setState({ selectedYear: year });\r\n if (this.props.onYearChange) { this.props.onYearChange(year); }\r\n this.handleDateChange(DropdownComponent.year, year);\r\n }\r\n\r\n handleMonthChange = (e: any) => {\r\n const month = parseInt(e.target.value);\r\n this.setState({ selectedMonth: month });\r\n if (this.props.onMonthChange) { this.props.onMonthChange(monthByNumber[month]); }\r\n this.handleDateChange(DropdownComponent.month, month);\r\n }\r\n\r\n handleDayChange = (e: any) => {\r\n const day = parseInt(e.target.value);\r\n this.setState({ selectedDay: day });\r\n if (this.props.onDayChange) { this.props.onDayChange(day); }\r\n this.handleDateChange(DropdownComponent.day, day);\r\n }\r\n\r\n renderYear = () => {\r\n const { classes, ids, names } = this.props;\r\n return (\r\n <div\r\n key=\"year\"\r\n id=\"dropdown-year\"\r\n className={(classes && classes.yearContainer) ? classes.yearContainer : undefined}\r\n >\r\n <select\r\n id={(ids && ids.year) ? ids.year : undefined}\r\n name={(names && names.year) ? names.year : undefined}\r\n className={(classes && classes.year) ? classes.year : undefined}\r\n onChange={this.handleYearChange}\r\n value={this.state.selectedYear}\r\n >\r\n {this.generateYearOptions()}\r\n </select>\r\n </div>\r\n )\r\n }\r\n\r\n renderMonth = () => {\r\n const { classes, ids, names } = this.props;\r\n return (\r\n <div\r\n key=\"month\"\r\n id=\"dropdown-month\"\r\n className={(classes && classes.monthContainer) ? classes.monthContainer : undefined}\r\n >\r\n <select\r\n id={(ids && ids.month) ? ids.month : undefined}\r\n name={(names && names.month) ? names.month : undefined}\r\n className={(classes && classes.month) ? classes.month : undefined}\r\n onChange={this.handleMonthChange}\r\n value={this.state.selectedMonth}\r\n >\r\n {this.generateMonthOptions()}\r\n </select>\r\n </div>\r\n )\r\n }\r\n\r\n renderDay = () => {\r\n const { classes, ids, names } = this.props;\r\n return (\r\n <div\r\n key=\"day\"\r\n id=\"dropdown-day\"\r\n className={(classes && classes.dayContainer) ? classes.dayContainer : undefined}\r\n >\r\n <select\r\n id={(ids && ids.day) ? ids.day : undefined}\r\n name={(names && names.day) ? names.day : undefined}\r\n className={(classes && classes.day) ? classes.day : undefined}\r\n onChange={this.handleDayChange}\r\n value={this.state.selectedDay}\r\n >\r\n {this.generateDayOptions()}\r\n </select>\r\n </div>\r\n )\r\n }\r\n\r\n render = () => {\r\n const { classes } = this.props;\r\n let { order } = this.props;\r\n order = order || [DropdownComponent.year, DropdownComponent.month, DropdownComponent.day];\r\n return (\r\n <div\r\n id=\"dropdown-date\"\r\n className={(classes && classes.dateContainer) ? classes.dateContainer : undefined}>\r\n {order.map(part => {\r\n return this.renderParts[part]()\r\n })}\r\n </div>\r\n );\r\n }\r\n}\r\n"],"names":["React.createElement","React.Component","DropdownComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqBgC,8BAA+B;IAA/D;QAAA,qEA8DC;QA5DG,uBAAiB,GAAG;YACV,IAAA,KAAuD,KAAI,CAAC,KAAK,EAA/D,KAAK,WAAA,EAAE,GAAG,SAAA,EAAE,OAAO,aAAA,EAAE,aAAa,mBAAA,EAAE,YAAY,kBAAe,CAAC;YACxE,IAAM,SAAS,GAAG,KAAK,IAAI,IAAI,CAAC;YAChC,IAAM,OAAO,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YAEhD,IAAM,KAAK,GAAG,EAAE,CAAC;YACjB,IAAI,SAAS,IAAI,OAAO,EAAE;gBACtB,KAAK,IAAI,CAAC,GAAG,SAAS,EAAE,CAAC,IAAI,OAAO,EAAE,EAAE,CAAC,EAAE;oBACvC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACjB;aACJ;iBAAM;gBACH,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,IAAI,SAAS,EAAE,EAAE,CAAC,EAAE;oBACvC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACjB;aACJ;YACD,IAAI,OAAO,EAAE;gBACT,KAAK,CAAC,OAAO,EAAE,CAAC;aACnB;YACD,IAAM,WAAW,GAAG,EAAE,CAAC;YACvB,WAAW,CAAC,IAAI,CACZA,gCACI,KAAK,EAAC,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,gCAAQ,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EACpB,SAAS,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,IAC7E,CAAC,CAAU,CAChB,CAAC;iBACL;aACJ;SACJ;QACD,OAAO,UAAU,CAAC;KACrB;IAoHL,mBAAC;AAAD,CAAC,CAlXiCC,eAAe;;;;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
year: number;
|
|
4
|
-
value: number;
|
|
5
|
-
onChange: Function;
|
|
6
|
-
defaultValue?: string;
|
|
7
|
-
numeric?: boolean;
|
|
8
|
-
short?: boolean;
|
|
9
|
-
caps?: boolean;
|
|
10
|
-
endYearGiven?: boolean;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
id?: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
classes?: string;
|
|
16
|
-
optionClasses?: string;
|
|
17
|
-
}
|
|
18
|
-
interface IState {
|
|
19
|
-
}
|
|
20
|
-
export declare class MonthPicker extends React.Component<IProps, IState> {
|
|
21
|
-
renderMonthOptions: () => JSX.Element[];
|
|
22
|
-
handleSelectionChange: (e: any) => any;
|
|
23
|
-
render: () => JSX.Element;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IProps {
|
|
3
|
-
value: number;
|
|
4
|
-
onChange: Function;
|
|
5
|
-
id?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
defaultValue?: string;
|
|
8
|
-
start?: number;
|
|
9
|
-
end?: number;
|
|
10
|
-
reverse?: boolean;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
classes?: string;
|
|
14
|
-
optionClasses?: string;
|
|
15
|
-
}
|
|
16
|
-
interface IState {
|
|
17
|
-
}
|
|
18
|
-
export declare class YearPicker extends React.Component<IProps, IState> {
|
|
19
|
-
renderYearOptions: () => JSX.Element[];
|
|
20
|
-
handleSelectionChange: (e: any) => any;
|
|
21
|
-
render: () => JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|