adb-shared 6.2.13 → 6.2.14
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/fesm2022/adb-shared.mjs
CHANGED
|
@@ -3485,16 +3485,19 @@ class AdbMapFilters {
|
|
|
3485
3485
|
return form;
|
|
3486
3486
|
}
|
|
3487
3487
|
updateCustomDate(form, period, qMap) {
|
|
3488
|
-
// Remove existing controls safely
|
|
3489
3488
|
if (form.contains('startAt')) {
|
|
3490
3489
|
form.removeControl('startAt');
|
|
3491
3490
|
}
|
|
3492
3491
|
if (form.contains('endAt')) {
|
|
3493
3492
|
form.removeControl('endAt');
|
|
3494
3493
|
}
|
|
3495
|
-
if (period ===
|
|
3496
|
-
|
|
3497
|
-
|
|
3494
|
+
if (period === DateTypes.CUSTOM) {
|
|
3495
|
+
let start = qMap.has('startAt') ? parseISO(qMap.get('startAt')) : null;
|
|
3496
|
+
let end = qMap.has('endAt') ? parseISO(qMap.get('endAt')) : null;
|
|
3497
|
+
if (qMap.get('p') !== DateTypes.CUSTOM) {
|
|
3498
|
+
start = new Date();
|
|
3499
|
+
end = new Date();
|
|
3500
|
+
}
|
|
3498
3501
|
this.dateStartConfig = { maxDate: end ?? new Date() };
|
|
3499
3502
|
this.dateEndConfig = { minDate: start ?? null, maxDate: new Date() };
|
|
3500
3503
|
const startControl = new FormControl(start, Validators.required);
|