@ardium-pl/devkit 8.4.1 → 8.4.3
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.
|
@@ -2546,8 +2546,17 @@ class FormControlTracker {
|
|
|
2546
2546
|
}
|
|
2547
2547
|
// grab the AbstractControl instance
|
|
2548
2548
|
const instance = ngControl.control;
|
|
2549
|
-
|
|
2549
|
+
// ensure that control is not InteropNgControl from Angular 22
|
|
2550
|
+
// (even though the library is using Angular 18)
|
|
2551
|
+
// but it causes issues when paired with signal forms
|
|
2552
|
+
// InteropNgControl is always recurrently linked to itself through the control property
|
|
2553
|
+
if (!instance ||
|
|
2554
|
+
typeof instance !== 'object' ||
|
|
2555
|
+
('control' in instance && instance.control === instance) ||
|
|
2556
|
+
!('events' in instance) ||
|
|
2557
|
+
!isObservable(instance.events)) {
|
|
2550
2558
|
return;
|
|
2559
|
+
}
|
|
2551
2560
|
this.instance = instance;
|
|
2552
2561
|
}
|
|
2553
2562
|
}
|
|
@@ -2741,12 +2750,27 @@ function coerceDateProperty(v, fallback) {
|
|
|
2741
2750
|
}
|
|
2742
2751
|
function coerceDateOnlyProperty(v, fallback, asUTC = false) {
|
|
2743
2752
|
if (typeof v == 'string') {
|
|
2744
|
-
|
|
2753
|
+
const lower = v.toLowerCase();
|
|
2754
|
+
if (lower === 'now' || lower === 'today') {
|
|
2755
|
+
const now = new Date();
|
|
2756
|
+
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
2757
|
+
return asUTC
|
|
2758
|
+
? getUTCDate(today.getFullYear(), today.getMonth(), today.getDate(), today.getHours(), today.getMinutes(), today.getSeconds(), today.getMilliseconds())
|
|
2759
|
+
: today;
|
|
2760
|
+
}
|
|
2761
|
+
if (lower === 'tomorrow') {
|
|
2762
|
+
const now = new Date();
|
|
2763
|
+
const tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
|
|
2764
|
+
return asUTC
|
|
2765
|
+
? getUTCDate(tomorrow.getFullYear(), tomorrow.getMonth(), tomorrow.getDate(), tomorrow.getHours(), tomorrow.getMinutes(), tomorrow.getSeconds(), tomorrow.getMilliseconds())
|
|
2766
|
+
: tomorrow;
|
|
2767
|
+
}
|
|
2768
|
+
if (lower === 'yesterday') {
|
|
2745
2769
|
const now = new Date();
|
|
2746
|
-
now.
|
|
2770
|
+
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
|
|
2747
2771
|
return asUTC
|
|
2748
|
-
? getUTCDate(
|
|
2749
|
-
:
|
|
2772
|
+
? getUTCDate(yesterday.getFullYear(), yesterday.getMonth(), yesterday.getDate(), yesterday.getHours(), yesterday.getMinutes(), yesterday.getSeconds(), yesterday.getMilliseconds())
|
|
2773
|
+
: yesterday;
|
|
2750
2774
|
}
|
|
2751
2775
|
}
|
|
2752
2776
|
const dateV = new Date(v);
|