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/package.json
CHANGED
|
@@ -876,13 +876,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
876
876
|
day={dateFilterState.startDate.day}
|
|
877
877
|
chooseFromPast
|
|
878
878
|
onChange={(month, day, year) => {
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
dateFilterState: {
|
|
882
|
-
...dateFilterState,
|
|
883
|
-
startDate: { month, day, year },
|
|
884
|
-
},
|
|
885
|
-
});
|
|
879
|
+
dateFilterState.startDate = { month, day, year };
|
|
880
|
+
handleDateRangeUpdated(dateFilterState);
|
|
886
881
|
}}
|
|
887
882
|
/>
|
|
888
883
|
{' '}
|
|
@@ -896,13 +891,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
896
891
|
day={dateFilterState.endDate.day}
|
|
897
892
|
chooseFromPast
|
|
898
893
|
onChange={(month, day, year) => {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
dateFilterState: {
|
|
902
|
-
...dateFilterState,
|
|
903
|
-
endDate: { month, day, year },
|
|
904
|
-
},
|
|
905
|
-
});
|
|
894
|
+
dateFilterState.endDate = { month, day, year };
|
|
895
|
+
handleDateRangeUpdated(dateFilterState);
|
|
906
896
|
}}
|
|
907
897
|
/>
|
|
908
898
|
</TabBox>
|
|
@@ -111,13 +111,26 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
|
|
|
111
111
|
// Figure out which days are allowed
|
|
112
112
|
const days = [];
|
|
113
113
|
const numDaysInMonth = (new Date(year, month, 0)).getDate();
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
if (chooseFromPast) {
|
|
115
|
+
// Past selection
|
|
116
|
+
const numDaysToAdd = (
|
|
117
|
+
(month === today.month)
|
|
118
|
+
? today.day // Current month, only add up to today
|
|
119
|
+
: numDaysInMonth // Past month, add all days
|
|
120
|
+
);
|
|
121
|
+
for (let day = 1; day <= numDaysToAdd; day++) {
|
|
122
|
+
days.push(day);
|
|
123
|
+
}
|
|
124
|
+
} else {
|
|
125
|
+
// Future selection: add all remaining days of the month
|
|
126
|
+
const firstDay = (
|
|
127
|
+
month === today.month
|
|
128
|
+
? today.day // Current month: start at current date
|
|
129
|
+
: 1 // Future month: start at beginning of month
|
|
130
|
+
);
|
|
131
|
+
for (let day = firstDay; day <= numDaysInMonth; day++) {
|
|
132
|
+
days.push(day);
|
|
133
|
+
}
|
|
121
134
|
}
|
|
122
135
|
|
|
123
136
|
choices.push({
|