dce-reactkit 3.2.2-beta.13 → 3.2.2-beta.15
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/dist/cjs/index.js +23 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +23 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +4 -14
- package/src/components/SimpleDateChooser.tsx +20 -7
package/dist/esm/index.js
CHANGED
|
@@ -1357,12 +1357,25 @@ const SimpleDateChooser = (props) => {
|
|
|
1357
1357
|
// Figure out which days are allowed
|
|
1358
1358
|
const days = [];
|
|
1359
1359
|
const numDaysInMonth = (new Date(year, month, 0)).getDate();
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1360
|
+
if (chooseFromPast) {
|
|
1361
|
+
// Past selection
|
|
1362
|
+
const numDaysToAdd = ((month === today.month)
|
|
1363
|
+
? today.day // Current month, only add up to today
|
|
1364
|
+
: numDaysInMonth // Past month, add all days
|
|
1365
|
+
);
|
|
1366
|
+
for (let day = 1; day <= numDaysToAdd; day++) {
|
|
1367
|
+
days.push(day);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
else {
|
|
1371
|
+
// Future selection: add all remaining days of the month
|
|
1372
|
+
const firstDay = (month === today.month
|
|
1373
|
+
? today.day // Current month: start at current date
|
|
1374
|
+
: 1 // Future month: start at beginning of month
|
|
1375
|
+
);
|
|
1376
|
+
for (let day = firstDay; day <= numDaysInMonth; day++) {
|
|
1377
|
+
days.push(day);
|
|
1378
|
+
}
|
|
1366
1379
|
}
|
|
1367
1380
|
choices.push({
|
|
1368
1381
|
choiceName: `${monthName} ${year}`,
|
|
@@ -3008,19 +3021,15 @@ const LogReviewer = (props) => {
|
|
|
3008
3021
|
if (expandedFilterDrawer === FilterDrawer.Date) {
|
|
3009
3022
|
filterDrawer = (React.createElement(TabBox, { title: "Date" },
|
|
3010
3023
|
React.createElement(SimpleDateChooser, { ariaLabel: "filter start date", name: "filter-start-date", year: dateFilterState.startDate.year, month: dateFilterState.startDate.month, day: dateFilterState.startDate.day, chooseFromPast: true, onChange: (month, day, year) => {
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
dateFilterState: Object.assign(Object.assign({}, dateFilterState), { startDate: { month, day, year } }),
|
|
3014
|
-
});
|
|
3024
|
+
dateFilterState.startDate = { month, day, year };
|
|
3025
|
+
handleDateRangeUpdated(dateFilterState);
|
|
3015
3026
|
} }),
|
|
3016
3027
|
' ',
|
|
3017
3028
|
"to",
|
|
3018
3029
|
' ',
|
|
3019
3030
|
React.createElement(SimpleDateChooser, { ariaLabel: "filter end date", name: "filter-end-date", year: dateFilterState.endDate.year, month: dateFilterState.endDate.month, day: dateFilterState.endDate.day, chooseFromPast: true, onChange: (month, day, year) => {
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
dateFilterState: Object.assign(Object.assign({}, dateFilterState), { endDate: { month, day, year } }),
|
|
3023
|
-
});
|
|
3031
|
+
dateFilterState.endDate = { month, day, year };
|
|
3032
|
+
handleDateRangeUpdated(dateFilterState);
|
|
3024
3033
|
} })));
|
|
3025
3034
|
}
|
|
3026
3035
|
else if (expandedFilterDrawer === FilterDrawer.Context) {
|