i-tech-shared-components 1.4.55 → 1.4.56-alpha.1770835262212
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.
|
@@ -1539,7 +1539,6 @@ class DateRangeDatepickerComponent {
|
|
|
1539
1539
|
this.isOpen = false;
|
|
1540
1540
|
this.isSelectingRange = false;
|
|
1541
1541
|
this.LabelTypeEnum = LabelTypeEnum;
|
|
1542
|
-
this.calendarClickCount = 0;
|
|
1543
1542
|
this.dateRangeForm = new UntypedFormGroup({
|
|
1544
1543
|
startDate: new UntypedFormControl('', [Validators.maxLength(10)]),
|
|
1545
1544
|
endDate: new UntypedFormControl('', [Validators.maxLength(10)]),
|
|
@@ -1600,6 +1599,7 @@ class DateRangeDatepickerComponent {
|
|
|
1600
1599
|
this.isSelectingRange = false;
|
|
1601
1600
|
if (startDate === null && endDate === null) {
|
|
1602
1601
|
this.dateRangeForm.reset();
|
|
1602
|
+
this.picker.select(null);
|
|
1603
1603
|
this.selectionChange.emit(value);
|
|
1604
1604
|
}
|
|
1605
1605
|
else if (startDate && endDate) {
|
|
@@ -1621,31 +1621,25 @@ class DateRangeDatepickerComponent {
|
|
|
1621
1621
|
this.isOpen = true;
|
|
1622
1622
|
if (this.presetActions?.length) {
|
|
1623
1623
|
this.selectionSub?.unsubscribe();
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
}
|
|
1644
|
-
}, 50);
|
|
1645
|
-
}
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
|
-
}, 200);
|
|
1624
|
+
let rangeStarted = false;
|
|
1625
|
+
const model = this.picker._model;
|
|
1626
|
+
if (model) {
|
|
1627
|
+
this.selectionSub = model.selectionChanged.subscribe((change) => {
|
|
1628
|
+
const selection = change?.selection;
|
|
1629
|
+
if (selection?.start && !selection?.end) {
|
|
1630
|
+
rangeStarted = true;
|
|
1631
|
+
}
|
|
1632
|
+
else if (selection?.start && selection?.end && rangeStarted) {
|
|
1633
|
+
rangeStarted = false;
|
|
1634
|
+
setTimeout(() => {
|
|
1635
|
+
const applyBtn = document.querySelector('.hidden-apply-btn');
|
|
1636
|
+
if (applyBtn) {
|
|
1637
|
+
applyBtn.click();
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1649
1643
|
}
|
|
1650
1644
|
}
|
|
1651
1645
|
onPickerClosed() {
|