ngxsmk-datepicker 3.0.5 → 3.0.6
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/README.md +24 -10
- package/docs/API.md +48 -2
- package/docs/COMPATIBILITY.md +108 -108
- package/docs/INTEGRATION.md +10 -28
- package/docs/IONIC_INTEGRATION.md +1 -1
- package/docs/LOCALE-GUIDE.md +3 -3
- package/docs/PLUGIN-ARCHITECTURE.md +58 -58
- package/docs/SSR-EXAMPLE.md +8 -8
- package/docs/THEME-TOKENS.md +2 -2
- package/docs/TIMEZONE.md +18 -9
- package/docs/extension-points.md +5 -5
- package/docs/signal-forms.md +9 -9
- package/docs/signals.md +2 -2
- package/docs/ssr.md +11 -11
- package/fesm2022/ngxsmk-datepicker-adapters.mjs +319 -0
- package/fesm2022/ngxsmk-datepicker-material.mjs +71 -0
- package/fesm2022/ngxsmk-datepicker.mjs +2782 -2750
- package/package.json +9 -1
- package/schematics/collection.json +10 -10
- package/schematics/ng-add/schema.json +14 -14
- package/styles/ionic-integration.css +274 -274
- package/types/ngxsmk-datepicker-adapters.d.ts +155 -0
- package/types/ngxsmk-datepicker-material.d.ts +12 -0
- package/types/ngxsmk-datepicker.d.ts +174 -152
package/README.md
CHANGED
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
**Last updated:**
|
|
30
|
+
**Last updated:** September 8, 2026 - **Current stable:** v3.0.6
|
|
31
31
|
|
|
32
32
|
### **Overview**
|
|
33
33
|
|
|
34
34
|
**ngxsmk-datepicker** is a high-performance, enterprise-ready date and range picker engineered for the modern Angular ecosystem (v17+). Built from the ground up with **Angular Signals**, it delivers a seamless, zoneless-ready experience for both desktop and mobile (Ionic) applications.
|
|
35
35
|
|
|
36
|
-
> **Stable Release**: `v3.0.
|
|
36
|
+
> **Stable Release**: `v3.0.6` is the current stable release with compiled `fesm2022` output and type declarations.
|
|
37
37
|
>
|
|
38
|
-
> **Stable line**: v2.3.x includes side-by-side **`calendars`**, **natural language input**, searchable **timezone selection dropdown UI**, dynamic range presets, and warning range highlighting. Versions **2.0.10** and **2.0.11** were broken and have been **unpublished**; use **v2.1.1+** or current **v3.0.
|
|
38
|
+
> **Stable line**: v2.3.x includes side-by-side **`calendars`**, **natural language input**, searchable **timezone selection dropdown UI**, dynamic range presets, and warning range highlighting. Versions **2.0.10** and **2.0.11** were broken and have been **unpublished**; use **v2.1.1+** or current **v3.0.6** on npm.
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
@@ -343,7 +343,7 @@ class MyHolidayProvider implements HolidayProvider {
|
|
|
343
343
|
|
|
344
344
|
### **Angular Material Form Fields**
|
|
345
345
|
|
|
346
|
-
Integrate with Angular Material's form field components for a seamless Material Design experience.
|
|
346
|
+
Integrate with Angular Material's form field components for a seamless Material Design experience. Import the optional **`ngxsmk-datepicker/material`** entry (keeps `@angular/material` out of the main bundle):
|
|
347
347
|
|
|
348
348
|
**Standalone Components:**
|
|
349
349
|
|
|
@@ -353,16 +353,28 @@ import { FormControl, FormGroup, ReactiveFormsModule } from "@angular/forms";
|
|
|
353
353
|
import { MatFormFieldModule } from "@angular/material/form-field";
|
|
354
354
|
import { MatInputModule } from "@angular/material/input";
|
|
355
355
|
import { NgxsmkDatepickerComponent } from "ngxsmk-datepicker";
|
|
356
|
+
import { NgxsmkDatepickerMatFormFieldControlDirective } from "ngxsmk-datepicker/material";
|
|
356
357
|
|
|
357
358
|
@Component({
|
|
358
359
|
selector: "app-material-form",
|
|
359
360
|
standalone: true,
|
|
360
|
-
imports: [
|
|
361
|
+
imports: [
|
|
362
|
+
ReactiveFormsModule,
|
|
363
|
+
MatFormFieldModule,
|
|
364
|
+
MatInputModule,
|
|
365
|
+
NgxsmkDatepickerComponent,
|
|
366
|
+
NgxsmkDatepickerMatFormFieldControlDirective,
|
|
367
|
+
],
|
|
361
368
|
template: `
|
|
362
369
|
<form [formGroup]="myForm">
|
|
363
370
|
<mat-form-field appearance="outline">
|
|
364
371
|
<mat-label>Select Date</mat-label>
|
|
365
|
-
<ngxsmk-datepicker
|
|
372
|
+
<ngxsmk-datepicker
|
|
373
|
+
ngxsmkMatFormFieldControl
|
|
374
|
+
mode="single"
|
|
375
|
+
formControlName="date"
|
|
376
|
+
placeholder="Choose a date"
|
|
377
|
+
></ngxsmk-datepicker>
|
|
366
378
|
</mat-form-field>
|
|
367
379
|
</form>
|
|
368
380
|
`,
|
|
@@ -374,17 +386,18 @@ export class MaterialFormComponent {
|
|
|
374
386
|
}
|
|
375
387
|
```
|
|
376
388
|
|
|
377
|
-
**Non-Standalone (NgModules):**
|
|
389
|
+
**Non-Standalone (NgModules):** Import `NgxsmkDatepickerMatFormFieldControlDirective` from `ngxsmk-datepicker/material` into your module `imports` (with `NgxsmkDatepickerComponent`, `MatFormFieldModule`, etc.) and put `ngxsmkMatFormFieldControl` on the datepicker. See [INTEGRATION.md § Angular Material](docs/INTEGRATION.md#angular-material).
|
|
378
390
|
|
|
379
391
|
**With Date Range:**
|
|
380
392
|
|
|
381
393
|
```html
|
|
382
394
|
<mat-form-field appearance="fill">
|
|
383
395
|
<mat-label>Date Range</mat-label>
|
|
384
|
-
<ngxsmk-datepicker mode="range" [showTime]="true" formControlName="dateRange"
|
|
396
|
+
<ngxsmk-datepicker ngxsmkMatFormFieldControl mode="range" [showTime]="true" formControlName="dateRange"></ngxsmk-datepicker>
|
|
385
397
|
</mat-form-field>
|
|
386
398
|
```
|
|
387
399
|
|
|
400
|
+
**Optional date adapters** (date-fns / Day.js / Luxon) live on a separate entry: `import { DateFnsAdapter } from 'ngxsmk-datepicker/adapters'`.
|
|
388
401
|
### **Ionic Components**
|
|
389
402
|
|
|
390
403
|
For best integration with Ionic, import the integration styles in your global CSS/SCSS file:
|
|
@@ -819,7 +832,8 @@ npm run build:analyze
|
|
|
819
832
|
|
|
820
833
|
**Build Output:**
|
|
821
834
|
|
|
822
|
-
- Main bundle: `dist/ngxsmk-datepicker/fesm2022/ngxsmk-datepicker.mjs` (~127KB)
|
|
835
|
+
- Main bundle: `dist/ngxsmk-datepicker/fesm2022/ngxsmk-datepicker.mjs` (~127KB gzipped / published target; raw FESM is larger)
|
|
836
|
+
- Optional: `ngxsmk-datepicker-adapters.mjs`, `ngxsmk-datepicker-material.mjs` (secondary entries)
|
|
823
837
|
- Type definitions: `dist/ngxsmk-datepicker/index.d.ts`
|
|
824
838
|
- Source maps: Automatically removed from production builds
|
|
825
839
|
|
|
@@ -901,7 +915,7 @@ We welcome and appreciate contributions from the community! Whether it's reporti
|
|
|
901
915
|
|
|
902
916
|
For a full list of changes, please refer to the [CHANGELOG.md](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/CHANGELOG.md) file.
|
|
903
917
|
|
|
904
|
-
### **v3.0.
|
|
918
|
+
### **v3.0.6** (Current Stable)
|
|
905
919
|
|
|
906
920
|
- **npm**: Published tarballs include compiled `fesm2022/` output and type declarations.
|
|
907
921
|
|
package/docs/API.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This document describes the stable public API of ngxsmk-datepicker with comprehensive real-world examples. APIs marked as **stable** are guaranteed to remain backward-compatible within the same major version. APIs marked as **experimental** may change in future releases.
|
|
4
4
|
|
|
5
|
-
**Version**: 3.0.
|
|
5
|
+
**Version**: 3.0.6 | **Last updated**: September 8, 2026
|
|
6
6
|
|
|
7
7
|
## Stable vs experimental
|
|
8
8
|
|
|
@@ -84,7 +84,7 @@ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
|
84
84
|
| `hooks` | `DatepickerHooks \| null` | `null` | Stable | Extension points for customization | `[hooks]="customHooks"` |
|
|
85
85
|
| `enableKeyboardShortcuts` | `boolean` | `true` | Stable | Enable/disable keyboard shortcuts. Press '?' for help. | `[enableKeyboardShortcuts]="false"` |
|
|
86
86
|
| `customShortcuts` | `{ [key: string]: (context: KeyboardShortcutContext) => boolean } \| null` | `null` | Stable | Custom keyboard shortcuts map | `[customShortcuts]="myShortcuts"` |
|
|
87
|
-
| `autoApplyClose` | `boolean` | `false` | Stable |
|
|
87
|
+
| `autoApplyClose` | `boolean` | `false` | Stable | Opt-in auto-close after a complete selection. Forced off when `showTime` / `timeOnly` / inline. | `[autoApplyClose]="true"` |
|
|
88
88
|
| `clearLabel` | `string` | `'Clear'` | Stable | Custom label for clear button | `clearLabel="Reset"` |
|
|
89
89
|
| `closeLabel` | `string` | `'Close'` | Stable | Custom label for close button | `closeLabel="Done"` |
|
|
90
90
|
| `prevMonthAriaLabel` | `string` | `'Previous month'` | Stable | ARIA label for previous month button | `prevMonthAriaLabel="Go to previous month"` |
|
|
@@ -2343,6 +2343,34 @@ interface DatepickerClasses {
|
|
|
2343
2343
|
|
|
2344
2344
|
## Exported Utilities
|
|
2345
2345
|
|
|
2346
|
+
### Constraints Snapshot
|
|
2347
|
+
|
|
2348
|
+
**Status**: Stable (v3.0.6+)
|
|
2349
|
+
|
|
2350
|
+
Allowed-day truth for min/max, disabled dates/ranges, holidays, async disabled sets, and `isInvalidDate`. The Host rebuilds an immutable snapshot when constraint inputs change; forms validators map `ConstraintDenial` codes to public error keys. See `docs/adr/0001-hybrid-constraints-snapshot.md` and root `CONTEXT.md`.
|
|
2351
|
+
|
|
2352
|
+
```typescript
|
|
2353
|
+
import {
|
|
2354
|
+
Constraints,
|
|
2355
|
+
buildConstraints,
|
|
2356
|
+
EMPTY_CONSTRAINTS_SOURCES,
|
|
2357
|
+
type ConstraintsSources,
|
|
2358
|
+
type ConstraintsSnapshot,
|
|
2359
|
+
type DayVerdict,
|
|
2360
|
+
type ConstraintDenial,
|
|
2361
|
+
} from 'ngxsmk-datepicker';
|
|
2362
|
+
|
|
2363
|
+
const snap = Constraints.build({
|
|
2364
|
+
...EMPTY_CONSTRAINTS_SOURCES,
|
|
2365
|
+
minDate: new Date(2026, 0, 1),
|
|
2366
|
+
maxDate: new Date(2026, 11, 31),
|
|
2367
|
+
disabledDates: ['2026-01-15'],
|
|
2368
|
+
});
|
|
2369
|
+
|
|
2370
|
+
snap.isAllowed(new Date(2026, 0, 15)); // false
|
|
2371
|
+
snap.evaluate(new Date(2026, 0, 15)); // { allowed: false, denial: { code: 'disabledDate', ... } }
|
|
2372
|
+
```
|
|
2373
|
+
|
|
2346
2374
|
### Date Utilities
|
|
2347
2375
|
|
|
2348
2376
|
**Status**: Stable
|
|
@@ -2363,6 +2391,24 @@ export function getDaysInMonth(year: number, month: number): number;
|
|
|
2363
2391
|
export function getFirstDayOfMonth(year: number, month: number): number;
|
|
2364
2392
|
```
|
|
2365
2393
|
|
|
2394
|
+
## Secondary entry points
|
|
2395
|
+
|
|
2396
|
+
Optional packages stay out of the main FESM:
|
|
2397
|
+
|
|
2398
|
+
| Import path | Contents | Notes |
|
|
2399
|
+
|-------------|----------|--------|
|
|
2400
|
+
| `ngxsmk-datepicker` | Component, validators, Constraints, utils, config | Main bundle |
|
|
2401
|
+
| `ngxsmk-datepicker/adapters` | `DateFnsAdapter`, `DayjsAdapter`, `LuxonAdapter` | Install the matching peer library |
|
|
2402
|
+
| `ngxsmk-datepicker/material` | `NgxsmkDatepickerMatFormFieldControlDirective`, `provideMaterialFormFieldControl` | Requires `@angular/material` + `@angular/cdk` |
|
|
2403
|
+
| `ngxsmk-datepicker/styles/*` | CSS assets | Styles only |
|
|
2404
|
+
|
|
2405
|
+
```typescript
|
|
2406
|
+
import { DateFnsAdapter } from 'ngxsmk-datepicker/adapters';
|
|
2407
|
+
import { NgxsmkDatepickerMatFormFieldControlDirective } from 'ngxsmk-datepicker/material';
|
|
2408
|
+
```
|
|
2409
|
+
|
|
2410
|
+
`NativeDateAdapter` / `DateAdapter` remain on the main entry.
|
|
2411
|
+
|
|
2366
2412
|
## Virtual scrolling
|
|
2367
2413
|
|
|
2368
2414
|
Year and decade views use the internal `calculateVirtualScroll` utility and visible-index signals so that only visible items are rendered when year ranges are large (e.g. 100+ years). The main calendar grid uses lazy month rendering via `_visibleCalendarIndicesSignal`. For very large ranges, consider limiting `yearRange` for optimal performance.
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
# Version Compatibility Matrix
|
|
2
2
|
|
|
3
|
-
**Last updated:**
|
|
3
|
+
**Last updated:** September 8, 2026 - **Current stable:** v3.0.6
|
|
4
4
|
|
|
5
5
|
This document provides comprehensive compatibility information for `ngxsmk-datepicker` across different Angular versions, Zone.js configurations, and SSR/CSR setups.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## ?? Angular Version Compatibility
|
|
8
8
|
|
|
9
9
|
### Compatibility Matrix
|
|
10
10
|
|
|
11
11
|
| Angular Version | Status | Core Features | Signal Features | Signal Forms | SSR Support | Notes |
|
|
12
12
|
|----------------|--------|--------------|----------------|--------------|-------------|-------|
|
|
13
|
-
| **Angular 17** |
|
|
14
|
-
| **Angular 18** |
|
|
15
|
-
| **Angular 19** |
|
|
16
|
-
| **Angular 20** |
|
|
17
|
-
| **Angular 21** |
|
|
18
|
-
| **Angular 22+** |
|
|
13
|
+
| **Angular 17** | ? Fully Supported | ? All | ? Signals, Computed | ? Not Available | ? Full | Minimum supported version |
|
|
14
|
+
| **Angular 18** | ? Fully Supported | ? All | ? Signals, Computed, Effects | ? Not Available | ? Full | Enhanced signal support |
|
|
15
|
+
| **Angular 19** | ? Fully Supported | ? All | ? Signals, Computed, Effects | ? Not Available | ? Full | Optimized performance |
|
|
16
|
+
| **Angular 20** | ? Fully Supported | ? All | ? Signals, Computed, Effects | ? Not Available | ? Full | Fully supported |
|
|
17
|
+
| **Angular 21** | ? Fully Supported | ? All | ? Signals, Computed, Effects | ? Signal Forms `[field]` | ? Full | **Officially released - Current development target**<br/>? Signal Forms (experimental)<br/>? Zoneless by default<br/>? Compatible with Vitest-based apps<br/>? Angular Aria compatible |
|
|
18
|
+
| **Angular 22+** | ?? Future Support | ? All | ? Signals, Computed, Effects | ? Signal Forms `[field]` | ? Full | Peer dependency: `<24.0.0` |
|
|
19
19
|
|
|
20
20
|
### Feature Availability by Angular Version
|
|
21
21
|
|
|
22
22
|
#### Core Features (Available in all versions)
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
23
|
+
- ? Date selection (single, range, multiple)
|
|
24
|
+
- ? Time selection
|
|
25
|
+
- ? Calendar views (month, year, decade, timeline, time-slider)
|
|
26
|
+
- ? Keyboard navigation
|
|
27
|
+
- ? Touch gestures
|
|
28
|
+
- ? RTL support
|
|
29
|
+
- ? Timezone support
|
|
30
|
+
- ? Custom formatting
|
|
31
|
+
- ? Holiday provider integration
|
|
32
|
+
- ? Custom hooks and extensions
|
|
33
|
+
- ? Accessibility (ARIA, keyboard)
|
|
34
|
+
- ? Theming (light/dark)
|
|
35
|
+
- ? Translations/i18n
|
|
36
36
|
|
|
37
37
|
#### Signal Features (Angular 17+)
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
38
|
+
- ? `signal()` - Reactive state management
|
|
39
|
+
- ? `computed()` - Derived reactive values
|
|
40
|
+
- ? `effect()` - Side effects (Angular 18+)
|
|
41
|
+
- ? `inject()` - Dependency injection
|
|
42
42
|
|
|
43
43
|
#### Signal Forms (Angular 21+)
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
44
|
+
- ? `[field]` input binding (experimental Angular 21 feature)
|
|
45
|
+
- ? Automatic field synchronization
|
|
46
|
+
- ? Reactive form field updates
|
|
47
|
+
- ? Signal-based value management
|
|
48
|
+
- ? Works with `form()`, `objectSchema()`, and `validators`
|
|
49
|
+
- ? Compatible with `httpResource` and `linkedSignal` patterns
|
|
50
50
|
|
|
51
51
|
#### Angular 21 New Features Compatibility
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
52
|
+
- ? **Zoneless by Default**: Fully compatible with Angular 21 apps that don't include Zone.js
|
|
53
|
+
- ? **Vitest Test Runner**: Library works in apps using Vitest-based setups
|
|
54
|
+
- ? **Angular Aria**: Compatible with Angular Aria components; uses custom ARIA implementation for screen reader support
|
|
55
55
|
|
|
56
56
|
### Peer Dependencies
|
|
57
57
|
|
|
@@ -65,7 +65,7 @@ This document provides comprehensive compatibility information for `ngxsmk-datep
|
|
|
65
65
|
|
|
66
66
|
**Zone.js**: Optional (declared in `peerDependenciesMeta`)
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## ?? Zone.js vs Zoneless Compatibility
|
|
69
69
|
|
|
70
70
|
### Overview
|
|
71
71
|
|
|
@@ -75,12 +75,12 @@ This document provides comprehensive compatibility information for `ngxsmk-datep
|
|
|
75
75
|
|
|
76
76
|
| Feature | With Zone.js | Without Zone.js | Notes |
|
|
77
77
|
|---------|--------------|-----------------|-------|
|
|
78
|
-
| **Change Detection** |
|
|
79
|
-
| **Form Integration** |
|
|
80
|
-
| **Event Handling** |
|
|
81
|
-
| **Signal Updates** |
|
|
82
|
-
| **Reactive Forms** |
|
|
83
|
-
| **Signal Forms** |
|
|
78
|
+
| **Change Detection** | ? Automatic | ? Manual (OnPush) | Component uses `OnPush` strategy |
|
|
79
|
+
| **Form Integration** | ? Works | ? Works | Uses `ControlValueAccessor` |
|
|
80
|
+
| **Event Handling** | ? Works | ? Works | Native event listeners |
|
|
81
|
+
| **Signal Updates** | ? Works | ? Works | Signals trigger change detection |
|
|
82
|
+
| **Reactive Forms** | ? Works | ? Works | FormControl integration |
|
|
83
|
+
| **Signal Forms** | ? Works | ? Works | Angular 21+ signal forms |
|
|
84
84
|
|
|
85
85
|
### Zoneless Setup
|
|
86
86
|
|
|
@@ -89,7 +89,7 @@ The component uses **OnPush change detection strategy** and **signals** for reac
|
|
|
89
89
|
```typescript
|
|
90
90
|
@Component({
|
|
91
91
|
selector: 'ngxsmk-datepicker',
|
|
92
|
-
changeDetection: ChangeDetectionStrategy.OnPush, //
|
|
92
|
+
changeDetection: ChangeDetectionStrategy.OnPush, // ? Zoneless compatible
|
|
93
93
|
// ...
|
|
94
94
|
})
|
|
95
95
|
```
|
|
@@ -155,14 +155,14 @@ bootstrapApplication(AppComponent, {
|
|
|
155
155
|
});
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
### Migration Guide: Zone.js
|
|
158
|
+
### Migration Guide: Zone.js ? Zoneless
|
|
159
159
|
|
|
160
160
|
1. **Remove Zone.js dependency** (if desired)
|
|
161
161
|
2. **Ensure OnPush strategy** (already used by component)
|
|
162
162
|
3. **Use signals for state** (component already uses signals)
|
|
163
163
|
4. **No code changes needed** - component is zoneless-ready
|
|
164
164
|
|
|
165
|
-
##
|
|
165
|
+
## ?? SSR vs CSR Compatibility
|
|
166
166
|
|
|
167
167
|
### Server-Side Rendering (SSR)
|
|
168
168
|
|
|
@@ -172,12 +172,12 @@ The component is **fully compatible** with Angular Universal and SSR.
|
|
|
172
172
|
|
|
173
173
|
| Feature | SSR Support | Implementation |
|
|
174
174
|
|---------|-------------|----------------|
|
|
175
|
-
| **Platform Detection** |
|
|
176
|
-
| **DOM Access** |
|
|
177
|
-
| **Event Listeners** |
|
|
178
|
-
| **Date Formatting** |
|
|
179
|
-
| **Local Storage** |
|
|
180
|
-
| **Window/Document** |
|
|
175
|
+
| **Platform Detection** | ? Safe | Uses `isPlatformBrowser()` and `PLATFORM_ID` |
|
|
176
|
+
| **DOM Access** | ? Safe | Guarded with `isBrowser` checks |
|
|
177
|
+
| **Event Listeners** | ? Safe | Only attached in browser |
|
|
178
|
+
| **Date Formatting** | ? Safe | Uses `Intl` API (available in Node.js) |
|
|
179
|
+
| **Local Storage** | ? Safe | Not used |
|
|
180
|
+
| **Window/Document** | ? Safe | Guarded with platform checks |
|
|
181
181
|
|
|
182
182
|
#### SSR Implementation Details
|
|
183
183
|
|
|
@@ -214,11 +214,11 @@ All features work identically in CSR mode. No special configuration needed.
|
|
|
214
214
|
| Aspect | SSR | CSR | Notes |
|
|
215
215
|
|--------|-----|-----|-------|
|
|
216
216
|
| **Initial Render** | Server | Browser | Component renders on both |
|
|
217
|
-
| **DOM Access** |
|
|
218
|
-
| **Event Listeners** |
|
|
219
|
-
| **Date Formatting** |
|
|
220
|
-
| **Locale Detection** |
|
|
221
|
-
| **Performance** |
|
|
217
|
+
| **DOM Access** | ? Not Available | ? Available | Guarded with `isPlatformBrowser()` |
|
|
218
|
+
| **Event Listeners** | ? Not Attached | ? Attached | Only in browser |
|
|
219
|
+
| **Date Formatting** | ? Works | ? Works | Uses `Intl` API |
|
|
220
|
+
| **Locale Detection** | ?? Limited | ? Full | Server uses default, browser detects |
|
|
221
|
+
| **Performance** | ? Fast Initial Load | ? Interactive | SSR improves SEO and initial load |
|
|
222
222
|
|
|
223
223
|
### SSR Setup Example
|
|
224
224
|
|
|
@@ -250,7 +250,7 @@ export class MyComponent {
|
|
|
250
250
|
}
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
##
|
|
253
|
+
## ?? Shadow DOM & Web Components Compatibility
|
|
254
254
|
|
|
255
255
|
`ngxsmk-datepicker` is fully compatible with **Shadow DOM encapsulation** (`ViewEncapsulation.ShadowDom`) and deployment as an **Angular Element (Custom Web Component)** inside other frameworks (React, Vue, etc.).
|
|
256
256
|
|
|
@@ -262,39 +262,39 @@ When components are loaded inside a Shadow root, the browser retargets event tar
|
|
|
262
262
|
* Falls back to standard light DOM `.contains(target)` when composed paths are not supported by the environment.
|
|
263
263
|
* Supported across both the primary Datepicker component and Custom Select dropdown components.
|
|
264
264
|
|
|
265
|
-
##
|
|
265
|
+
## ?? Feature Compatibility Matrix
|
|
266
266
|
|
|
267
267
|
### By Angular Version
|
|
268
268
|
|
|
269
269
|
| Feature | Angular 17 | Angular 18 | Angular 19 | Angular 20 | Angular 21+ |
|
|
270
270
|
|---------|------------|-----------|------------|------------|-------------|
|
|
271
|
-
| **Standalone Component** |
|
|
272
|
-
| **Signals** |
|
|
273
|
-
| **Shadow DOM Support** |
|
|
274
|
-
| **Computed Signals** |
|
|
275
|
-
| **Effects** |
|
|
276
|
-
| **Signal Forms** |
|
|
277
|
-
| **ControlValueAccessor** |
|
|
278
|
-
| **Reactive Forms** |
|
|
279
|
-
| **OnPush Strategy** |
|
|
280
|
-
| **SSR Support** |
|
|
281
|
-
| **Zoneless Support** |
|
|
282
|
-
| **Translations/i18n** |
|
|
283
|
-
| **Locale Registry** |
|
|
271
|
+
| **Standalone Component** | ? | ? | ? | ? | ? |
|
|
272
|
+
| **Signals** | ? | ? | ? | ? | ? |
|
|
273
|
+
| **Shadow DOM Support** | ? | ? | ? | ? | ? |
|
|
274
|
+
| **Computed Signals** | ? | ? | ? | ? | ? |
|
|
275
|
+
| **Effects** | ?? Limited | ? | ? | ? | ? |
|
|
276
|
+
| **Signal Forms** | ? | ? | ? | ? | ? |
|
|
277
|
+
| **ControlValueAccessor** | ? | ? | ? | ? | ? |
|
|
278
|
+
| **Reactive Forms** | ? | ? | ? | ? | ? |
|
|
279
|
+
| **OnPush Strategy** | ? | ? | ? | ? | ? |
|
|
280
|
+
| **SSR Support** | ? | ? | ? | ? | ? |
|
|
281
|
+
| **Zoneless Support** | ? | ? | ? | ? | ? |
|
|
282
|
+
| **Translations/i18n** | ? | ? | ? | ? | ? |
|
|
283
|
+
| **Locale Registry** | ? | ? | ? | ? | ? |
|
|
284
284
|
|
|
285
285
|
### By Configuration
|
|
286
286
|
|
|
287
287
|
| Configuration | Zone.js | Zoneless | SSR | CSR |
|
|
288
288
|
|---------------|---------|----------|-----|-----|
|
|
289
|
-
| **Change Detection** |
|
|
290
|
-
| **Form Integration** |
|
|
291
|
-
| **Event Handling** |
|
|
292
|
-
| **Signal Updates** |
|
|
293
|
-
| **Date Formatting** |
|
|
294
|
-
| **Keyboard Navigation** |
|
|
295
|
-
| **Touch Gestures** |
|
|
289
|
+
| **Change Detection** | ? Auto | ? Manual | ? Works | ? Works |
|
|
290
|
+
| **Form Integration** | ? Works | ? Works | ? Works | ? Works |
|
|
291
|
+
| **Event Handling** | ? Works | ? Works | ?? Browser Only | ? Works |
|
|
292
|
+
| **Signal Updates** | ? Works | ? Works | ? Works | ? Works |
|
|
293
|
+
| **Date Formatting** | ? Works | ? Works | ? Works | ? Works |
|
|
294
|
+
| **Keyboard Navigation** | ? Works | ? Works | ?? Browser Only | ? Works |
|
|
295
|
+
| **Touch Gestures** | ? Works | ? Works | ?? Browser Only | ? Works |
|
|
296
296
|
|
|
297
|
-
##
|
|
297
|
+
## ?? Migration Guides
|
|
298
298
|
|
|
299
299
|
### Upgrading from Angular 17 to 21
|
|
300
300
|
|
|
@@ -356,7 +356,7 @@ When components are loaded inside a Shadow root, the browser retargets event tar
|
|
|
356
356
|
|
|
357
357
|
3. **No component changes needed** - component is SSR-safe
|
|
358
358
|
|
|
359
|
-
##
|
|
359
|
+
## ?? Known Limitations
|
|
360
360
|
|
|
361
361
|
### Angular 17
|
|
362
362
|
- Effects support is limited (use signals/computed instead)
|
|
@@ -370,43 +370,43 @@ When components are loaded inside a Shadow root, the browser retargets event tar
|
|
|
370
370
|
- Requires manual change detection (handled automatically by component)
|
|
371
371
|
- Form integration works the same as with Zone.js
|
|
372
372
|
|
|
373
|
-
##
|
|
373
|
+
## ?? Testing Compatibility
|
|
374
374
|
|
|
375
375
|
The component is tested against:
|
|
376
|
-
-
|
|
377
|
-
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
-
|
|
376
|
+
- ? Angular 17, 18, 19, 20, 21
|
|
377
|
+
- ? With and without Zone.js
|
|
378
|
+
- ? SSR and CSR modes
|
|
379
|
+
- ? Various browser environments
|
|
380
|
+
- ? **Vitest Compatible**: Works in Angular 21 applications using Vitest-based test setups
|
|
381
381
|
- Library tests use Karma/Jasmine, but the library itself is fully compatible with Vitest-based apps
|
|
382
382
|
- No changes needed when using Vitest in your Angular 21 application
|
|
383
383
|
|
|
384
|
-
##
|
|
384
|
+
## ?? Angular 21 New Features Support
|
|
385
385
|
|
|
386
386
|
### Signal Forms (Experimental)
|
|
387
|
-
-
|
|
388
|
-
-
|
|
389
|
-
-
|
|
390
|
-
-
|
|
387
|
+
- ? **Full Support**: `[field]` input binding for direct Signal Forms integration
|
|
388
|
+
- ? **Automatic Sync**: Two-way binding with signal form fields
|
|
389
|
+
- ? **Validation**: Respects field validation and disabled state
|
|
390
|
+
- ? **Server Integration**: Works with `httpResource` and `linkedSignal` patterns
|
|
391
391
|
|
|
392
392
|
### Zoneless by Default
|
|
393
|
-
-
|
|
394
|
-
-
|
|
395
|
-
-
|
|
396
|
-
-
|
|
393
|
+
- ? **Fully Compatible**: Works in Angular 21 apps without Zone.js
|
|
394
|
+
- ? **OnPush Strategy**: Uses OnPush change detection for optimal performance
|
|
395
|
+
- ? **Signal-Based**: Leverages signals for reactive updates
|
|
396
|
+
- ? **No Changes Needed**: Existing code works without modification
|
|
397
397
|
|
|
398
398
|
### Vitest Test Runner
|
|
399
|
-
-
|
|
400
|
-
-
|
|
401
|
-
-
|
|
399
|
+
- ? **Compatible**: Library works in apps using Vitest-based setups
|
|
400
|
+
- ? **No Migration Required**: Use the library as-is in Vitest-based projects
|
|
401
|
+
- ? **Test Suite**: Library tests use Karma/Jasmine but library is Vitest-compatible
|
|
402
402
|
|
|
403
403
|
### Angular Aria Compatibility
|
|
404
|
-
-
|
|
405
|
-
-
|
|
406
|
-
-
|
|
407
|
-
-
|
|
404
|
+
- ? **ARIA Support**: Built-in ARIA attributes and screen reader support
|
|
405
|
+
- ? **AriaLiveService**: Custom service for live region announcements
|
|
406
|
+
- ? **Compatible**: Works alongside Angular Aria components
|
|
407
|
+
- ? **Accessibility First**: All interactive elements have proper ARIA labels
|
|
408
408
|
|
|
409
|
-
##
|
|
409
|
+
## ?? Additional Resources
|
|
410
410
|
|
|
411
411
|
- [Angular Signals Documentation](https://angular.dev/guide/signals)
|
|
412
412
|
- [Angular SSR Guide](https://angular.dev/guide/ssr)
|
|
@@ -415,7 +415,7 @@ The component is tested against:
|
|
|
415
415
|
- [Vitest Documentation](https://vitest.dev/)
|
|
416
416
|
- [Angular Aria Documentation](https://angular.dev/guide/accessibility/angular-aria)
|
|
417
417
|
|
|
418
|
-
##
|
|
418
|
+
## ?? Version Detection
|
|
419
419
|
|
|
420
420
|
To check your Angular version:
|
|
421
421
|
|
|
@@ -429,7 +429,7 @@ To verify compatibility:
|
|
|
429
429
|
npm list @angular/core @angular/common @angular/forms
|
|
430
430
|
```
|
|
431
431
|
|
|
432
|
-
##
|
|
432
|
+
## ?? Best Practices
|
|
433
433
|
|
|
434
434
|
1. **Use Signal Forms** (Angular 21+): Prefer `[field]` input for better integration
|
|
435
435
|
2. **Enable SSR**: Improves SEO and initial load performance
|
|
@@ -437,7 +437,7 @@ npm list @angular/core @angular/common @angular/forms
|
|
|
437
437
|
4. **Use OnPush**: Already enabled, ensures optimal change detection
|
|
438
438
|
5. **Platform Checks**: Component handles SSR/CSR automatically
|
|
439
439
|
|
|
440
|
-
##
|
|
440
|
+
## ?? Troubleshooting
|
|
441
441
|
|
|
442
442
|
### Issue: Component not updating in zoneless app
|
|
443
443
|
**Solution**: Component uses `markForCheck()` internally. Ensure you're using signals for reactive updates.
|
|
@@ -463,9 +463,9 @@ Recommended validation before tagging a release:
|
|
|
463
463
|
| Lint | `npm run lint` | ESLint across workspace |
|
|
464
464
|
| E2E (optional CI) | `npm run e2e` with `BASE_URL` pointing at served demo | Playwright; set `CI=1` and start demo separately in pipelines |
|
|
465
465
|
|
|
466
|
-
**Angular minors**: Keep `@angular/*` on the same minor within the workspace (`package.json`). Bump peers in library `projects/ngxsmk-datepicker/package.json` when raising supported ceiling; update this doc
|
|
466
|
+
**Angular minors**: Keep `@angular/*` on the same minor within the workspace (`package.json`). Bump peers in library `projects/ngxsmk-datepicker/package.json` when raising supported ceiling; update this doc�s matrix table and peer JSON block together.
|
|
467
467
|
|
|
468
|
-
**Ionic/Capacitor sample**: The `examples/ionic-test-app` project may require `npm install --legacy-peer-deps` when Ionic
|
|
468
|
+
**Ionic/Capacitor sample**: The `examples/ionic-test-app` project may require `npm install --legacy-peer-deps` when Ionic�s peers lag Angular�see [examples/ionic-test-app/README.md](../../../examples/ionic-test-app/README.md).
|
|
469
469
|
|
|
470
470
|
|
|
471
471
|
|
package/docs/INTEGRATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# Integration Guides
|
|
2
2
|
|
|
3
|
-
**Last updated:**
|
|
3
|
+
**Last updated:** September 8, 2026 - **Current stable:** v3.0.6
|
|
4
4
|
|
|
5
5
|
This document provides integration examples for using ngxsmk-datepicker with popular frameworks and libraries.
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ Do not pass a theme object to the `[theme]` input; use `ThemeBuilderService` for
|
|
|
28
28
|
|
|
29
29
|
## Accessibility
|
|
30
30
|
|
|
31
|
-
The datepicker is built with **accessibility in mind**: keyboard navigation (arrows, Enter, Escape, T/Y/N/W, etc.), ARIA roles and labels on interactive elements, and live regions for screen reader announcements. For keyboard shortcuts and ARIA options see [API.md
|
|
31
|
+
The datepicker is built with **accessibility in mind**: keyboard navigation (arrows, Enter, Escape, T/Y/N/W, etc.), ARIA roles and labels on interactive elements, and live regions for screen reader announcements. For keyboard shortcuts and ARIA options see [API.md � Keyboard Support](API.md#keyboard-support) and the ARIA-related inputs in the API reference.
|
|
32
32
|
|
|
33
33
|
## Input sanitization and CSP
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ The datepicker is built with **accessibility in mind**: keyboard navigation (arr
|
|
|
37
37
|
|
|
38
38
|
## Angular Material
|
|
39
39
|
|
|
40
|
-
The main `ngxsmk-datepicker` bundle does **not** import `@angular/material`, so non-Material apps are not forced to install it. If you use `mat-form-field`, install Material and
|
|
40
|
+
The main `ngxsmk-datepicker` bundle does **not** import `@angular/material`, so non-Material apps are not forced to install it. If you use `mat-form-field`, install Material and import from the optional **`ngxsmk-datepicker/material`** entry as below.
|
|
41
41
|
|
|
42
42
|
### Installation
|
|
43
43
|
|
|
@@ -47,33 +47,15 @@ npm install @angular/material @angular/cdk ngxsmk-datepicker
|
|
|
47
47
|
|
|
48
48
|
### Basic Integration (Standalone Components)
|
|
49
49
|
|
|
50
|
-
**Recommended:**
|
|
50
|
+
**Recommended:** Import the **`ngxsmkMatFormFieldControl`** directive from the optional `ngxsmk-datepicker/material` entry so only Material apps pull in `@angular/material`:
|
|
51
51
|
|
|
52
52
|
```typescript
|
|
53
|
-
// ngxsmk-mat-form-field.directive.ts
|
|
54
|
-
import { Directive, forwardRef } from '@angular/core';
|
|
55
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
56
53
|
import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
57
|
-
|
|
58
|
-
@Directive({
|
|
59
|
-
selector: 'ngxsmk-datepicker[ngxsmkMatFormFieldControl]',
|
|
60
|
-
standalone: true,
|
|
61
|
-
providers: [
|
|
62
|
-
{ provide: MatFormFieldControl, useExisting: forwardRef(() => NgxsmkDatepickerComponent) },
|
|
63
|
-
],
|
|
64
|
-
})
|
|
65
|
-
export class NgxsmkDatepickerMatFormFieldControlDirective {}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Then in your component:
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
72
|
-
import { NgxsmkDatepickerMatFormFieldControlDirective } from './ngxsmk-mat-form-field.directive'; // your local file
|
|
54
|
+
import { NgxsmkDatepickerMatFormFieldControlDirective } from 'ngxsmk-datepicker/material';
|
|
73
55
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
74
56
|
|
|
75
57
|
@Component({
|
|
76
|
-
imports: [MatFormFieldModule, NgxsmkDatepickerComponent, NgxsmkDatepickerMatFormFieldControlDirective
|
|
58
|
+
imports: [MatFormFieldModule, NgxsmkDatepickerComponent, NgxsmkDatepickerMatFormFieldControlDirective],
|
|
77
59
|
template: `
|
|
78
60
|
<mat-form-field appearance="outline">
|
|
79
61
|
<mat-label>Select Date</mat-label>
|
|
@@ -133,16 +115,16 @@ export class DatepickerComponent {
|
|
|
133
115
|
}
|
|
134
116
|
```
|
|
135
117
|
|
|
136
|
-
**If you see "mat-form-field must contain a MatFormFieldControl":** Add the **`ngxsmkMatFormFieldControl`** directive to the datepicker
|
|
118
|
+
**If you see "mat-form-field must contain a MatFormFieldControl":** Add the **`ngxsmkMatFormFieldControl`** directive from `ngxsmk-datepicker/material` to the datepicker. Do not use `MAT_FORM_FIELD` or pass the wrong token; the directive is the supported path.
|
|
137
119
|
|
|
138
120
|
### Integration with Non-Standalone Components (NgModules)
|
|
139
121
|
|
|
140
|
-
|
|
122
|
+
Import the Material entry in your NgModule:
|
|
141
123
|
|
|
142
124
|
```typescript
|
|
143
125
|
import { NgModule } from '@angular/core';
|
|
144
126
|
import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
|
|
145
|
-
import { NgxsmkDatepickerMatFormFieldControlDirective } from '
|
|
127
|
+
import { NgxsmkDatepickerMatFormFieldControlDirective } from 'ngxsmk-datepicker/material';
|
|
146
128
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
147
129
|
import { MatInputModule } from '@angular/material/input';
|
|
148
130
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ionic Framework Integration Guide
|
|
2
2
|
|
|
3
|
-
**Last updated:**
|
|
3
|
+
**Last updated:** September 8, 2026 - **Current stable:** v3.0.6
|
|
4
4
|
|
|
5
5
|
This guide provides step-by-step instructions for integrating `ngxsmk-datepicker` with modern **Ionic 7, 8, & 9+** and **Angular 17–21+** applications.
|
|
6
6
|
|