ngxsmk-datepicker 2.2.0 → 2.2.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.
package/README.md CHANGED
@@ -24,15 +24,15 @@
24
24
 
25
25
  ---
26
26
 
27
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
27
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
28
28
 
29
29
  ### **Overview**
30
30
 
31
31
  **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.
32
32
 
33
- > **Stable Release**: `v2.2.0` is live! This release brings a **TypeScript Strictness Overhaul** (eliminating `any` types and ensuring `exactOptionalPropertyTypes` compatibility), fixes **appendToBody** popover positioning, datepicker-in-modal first-open behavior, and popover width matching the input; it also reduces loading time and cleans up CSS. No breaking changes.
33
+ > **Stable Release**: `v2.2.3` is live! This release brings a **TypeScript Strictness Overhaul** (eliminating `any` types), **Cognitive Complexity & Linting Fixes** for Material integration, and improved **Test Coverage (~68.2%)**. It also fixes **appendToBody** popover positioning, datepicker-in-modal behavior, and touch interaction regressions. No breaking changes.
34
34
  >
35
- > ⚠️ **Important**: Versions 2.0.10 and 2.0.11 are broken and have been unpublished. Please use v2.2.0 or later.
35
+ > ⚠️ **Important**: Versions 2.0.10 and 2.0.11 are broken and have been unpublished. Please use v2.2.3 or later.
36
36
 
37
37
  ---
38
38
 
@@ -136,30 +136,21 @@ Features marked as experimental may change:
136
136
 
137
137
  For details, see [CONTRIBUTING.md](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/CONTRIBUTING.md#deprecation-policy).
138
138
 
139
- ## **📦 Installation**
139
+ ## **🚀 Installation**
140
+
141
+ Install the package using npm:
140
142
 
141
143
  ```bash
142
- npm install ngxsmk-datepicker@2.2.0
144
+ npm install ngxsmk-datepicker@latest
143
145
  ```
144
146
 
145
147
  ### Alternative installation
146
148
 
147
- You can install without npm using any of these methods (peer dependencies must still be installed in your app):
148
-
149
- | Method | Command |
150
- |--------|--------|
151
- | **Yarn** | `yarn add ngxsmk-datepicker@2.2.0` |
152
- | **pnpm** | `pnpm add ngxsmk-datepicker@2.2.0` |
153
- | **Bun** | `bun add ngxsmk-datepicker@2.2.0` |
154
- | **From Git** | `npm install github:NGXSMK/ngxsmk-datepicker#v2.2.0` (requires the repo to have built output or you build from source) |
155
- | **Local path** | Build the library in the repo (`npx ng build ngxsmk-datepicker`), then `npm install /path/to/ngxsmk-datepicker/dist/ngxsmk-datepicker` |
156
- | **CDN (ESM)** | Use [unpkg](https://unpkg.com/ngxsmk-datepicker@2.2.0/) or [jsDelivr](https://cdn.jsdelivr.net/npm/ngxsmk-datepicker@2.2.0/) in your bundler or import map; peer dependencies (Angular, etc.) must be installed in your app. |
157
-
158
- For all options and caveats, see [docs/INSTALLATION.md](docs/INSTALLATION.md).
149
+ You can install without npm using Yarn, pnpm, Bun, from Git, a local path, or via CDN (ESM). Peer dependencies must still be installed in your app. For all options and caveats, see [INSTALLATION.md](../../docs/INSTALLATION.md) in the repo root.
159
150
 
160
151
  ## **Usage**
161
152
 
162
- ngxsmk-datepicker is a standalone component, so you can import it directly into your component or module.
153
+ ngxsmk-datepicker is a standalone component, so you can import it directly into your component or module. If you see **NG1010** (`'imports' must be an array... Value could not be determined statically`) when using the Angular compiler plugin or in strict AOT builds, use `NgxsmkDatepickerModule` in your `imports` array instead of `NgxsmkDatepickerComponent` (same template: `<ngxsmk-datepicker>`).
163
154
 
164
155
  ### Signal Forms (Angular 21)
165
156
 
@@ -229,7 +220,7 @@ For detailed Signal Forms integration including dirty state tracking, see the [S
229
220
 
230
221
  #### **1. Import the Component**
231
222
 
232
- In your component file (e.g., app.component.ts), import the component (or the module—see troubleshooting below).
223
+ In your component file (e.g., app.component.ts), import NgxsmkDatepickerComponent.
233
224
 
234
225
  import { Component } from '@angular/core';
235
226
  import { NgxsmkDatepickerComponent, DateRange, HolidayProvider } from 'ngxsmk-datepicker';
@@ -259,8 +250,6 @@ In your component file (e.g., app.component.ts), import the component (or the mo
259
250
  }
260
251
  }
261
252
 
262
- **If you see NG1010** (`'imports' must be an array... Value could not be determined statically`) when using the Angular compiler plugin or in strict AOT builds, use the wrapper module instead: `import { NgxsmkDatepickerModule } from 'ngxsmk-datepicker'` and set `imports: [NgxsmkDatepickerModule]`. The template stays the same (`<ngxsmk-datepicker>`).
263
-
264
253
  #### **2. Add it to Your Template**
265
254
 
266
255
  Use the `<ngxsmk-datepicker>` selector in your HTML template.
@@ -341,22 +330,7 @@ export class MaterialFormComponent {
341
330
  }
342
331
  ```
343
332
 
344
- **Non-Standalone Components (NgModules):**
345
-
346
- ```typescript
347
- import { NgModule } from "@angular/core";
348
- import { MAT_FORM_FIELD_CONTROL } from "@angular/material/form-field";
349
- import { NgxsmkDatepickerComponent, provideMaterialFormFieldControl } from "ngxsmk-datepicker";
350
- import { MatFormFieldModule } from "@angular/material/form-field";
351
- import { MatInputModule } from "@angular/material/input";
352
- import { ReactiveFormsModule } from "@angular/forms";
353
-
354
- @NgModule({
355
- imports: [NgxsmkDatepickerComponent, MatFormFieldModule, MatInputModule, ReactiveFormsModule],
356
- providers: [provideMaterialFormFieldControl(MAT_FORM_FIELD_CONTROL)],
357
- })
358
- export class MyModule {}
359
- ```
333
+ **Non-Standalone (NgModules):** Add the directive file from [INTEGRATION.md § Angular Material](docs/INTEGRATION.md#angular-material), then add it to your module `imports` (with `NgxsmkDatepickerComponent`, `MatFormFieldModule`, etc.) and use `ngxsmkMatFormFieldControl` on the datepicker in templates.
360
334
 
361
335
  **With Date Range:**
362
336
 
@@ -375,9 +349,6 @@ For best integration with Ionic, import the integration styles in your global CS
375
349
  @import "ngxsmk-datepicker/styles/ionic-integration.css";
376
350
  ```
377
351
 
378
- **Automatic Theming:**
379
- The datepicker automatically detects and uses Ionic CSS variables (e.g., `--ion-color-primary`, `--ion-background-color`) so it matches your app's theme out of the box without extra configuration.
380
-
381
352
  Works seamlessly with Ionic form components and follows Ionic design patterns:
382
353
 
383
354
  ```typescript
@@ -619,16 +590,16 @@ The `locale` input controls all internationalization. It automatically formats m
619
590
 
620
591
  ### **Global Language Support**
621
592
 
622
- ngxsmk-datepicker v2.2.0 now features **full localization synchronization** for:
593
+ ngxsmk-datepicker v2.2.3 now features **full localization synchronization** for:
623
594
 
624
- - �� English (`en`)
625
- - �� German (`de`)
626
- - �� French (`fr`)
627
- - �� Spanish (`es`)
595
+ - 🇺🇸 English (`en`)
596
+ - 🇩🇪 German (`de`)
597
+ - 🇫🇷 French (`fr`)
598
+ - 🇪🇸 Spanish (`es`)
628
599
  - 🇸🇪 Swedish (`sv`)
629
- - �� Korean (`ko`)
630
- - �� Chinese (`zh`)
631
- - �� Japanese (`ja`)
600
+ - 🇰🇷 Korean (`ko`)
601
+ - 🇨🇳 Chinese (`zh`)
602
+ - 🇯🇵 Japanese (`ja`)
632
603
 
633
604
  ### **Usage Example**
634
605
 
@@ -712,16 +683,14 @@ This library has been optimized for maximum performance:
712
683
 
713
684
  ## **🐛 Bug Fixes & Improvements**
714
685
 
715
- ### **Critical Bug Fixes in v1.4.15:**
686
+ ### **Critical Updates in v2.2.3:**
716
687
 
717
- - ✅ **Change Detection**: Fixed OnPush change detection issues with proper `markForCheck()` triggers
718
- - ✅ **Date Comparison**: Fixed null safety issues in date range comparisons
719
- - ✅ **Memory Leaks**: Added cache size limits to prevent memory leaks
720
- - ✅ **Type Safety**: Improved TypeScript types and null safety checks
721
- - ✅ **Mobile UX**: Enhanced mobile interactions and touch feedback
722
- - ✅ **Performance**: Optimized template bindings with memoized functions
723
- - ✅ **Accessibility**: Better focus states and keyboard navigation
724
- - ✅ **Build System**: Improved build configuration and optimization
688
+ - ✅ **Validation messages**: User-facing i18n strings for invalid date, min/max; `validationError` output and on-screen error display
689
+ - ✅ **Calendar loading state**: Visual spinner + text and screen-reader announcement while calendar opens/generates
690
+ - ✅ **Demo theme**: Light/dark theme toggle and system preference now correctly switch the demo UI
691
+ - ✅ **Installation options**: Full install guide (npm, Yarn, pnpm, Bun, Git, CDN, etc.) and demo page updates
692
+ - ✅ **Accessibility**: Loading state announced via live region; validation errors exposed for a11y
693
+ - ✅ **Type Safety**: New translation keys and strictly typed inputs/outputs
725
694
 
726
695
  ### **Performance Enhancements:**
727
696
 
@@ -877,16 +846,16 @@ We welcome and appreciate contributions from the community! Whether it's reporti
877
846
 
878
847
  For a full list of changes, please refer to the [CHANGELOG.md](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/CHANGELOG.md) file.
879
848
 
880
- ### **v2.2.0** (Current Stable)
849
+ ### **v2.2.3** (Current Stable)
881
850
 
882
- - 🎉 **Version Update**: Updated to version 2.2.0.
851
+ - 🎉 **Version Update**: Updated to version 2.2.3.
883
852
  - ✨ **Key Updates**: Optimized loading times, refined mobile header layout, and improved dropdown accessibility.
884
853
  - ✅ **Stable Release**: Full synchronization of header components with `ViewEncapsulation.None`.
885
854
 
886
855
  ### **v1.9.24**
887
856
 
888
857
  - 🎉 **Version Update**: Updated to version 1.9.24
889
- - ✅ **Stable Release**: Version 1.9.24 is the current stable version
858
+ - ✅ **Stable Release**: Version 2.2.3 is the current stable version
890
859
 
891
860
  ### **v1.9.23**
892
861
 
package/docs/API.md CHANGED
@@ -2,7 +2,12 @@
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**: 2.2.0+ | **Last updated**: February 25, 2026
5
+ **Version**: 2.2.3+ | **Last updated**: March 9, 2026
6
+
7
+ ## Stable vs experimental
8
+
9
+ - **Stable**: All inputs/outputs in the reference tables below are stable unless marked **Experimental**. Stable APIs will not change in a breaking way within the same major version.
10
+ - **Experimental**: Marked in the tables; may change in minor releases. Use with awareness.
6
11
 
7
12
  ## Versioning Policy
8
13
 
@@ -40,7 +45,7 @@ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
40
45
  | Input | Type | Default | Status | Description | Example |
41
46
  |-------|------|---------|--------|-------------|---------|
42
47
  | `mode` | `'single' \| 'range' \| 'multiple'` | `'single'` | Stable | Selection mode | `mode="single"` or `[mode]="'range'"` |
43
- | `value` | `DatepickerValue` | `null` | Stable | Current value (one-way binding) | `[value]="selectedDate"` |
48
+ | `value` | `DatepickerValue` | `null` | Stable | Current value (one-way binding). For two-way binding with a signal, use `[value]="dateSignal()"` and `(valueChange)="dateSignal.set($event)"`. | `[value]="selectedDate"` |
44
49
  | `field` | `SignalFormField \| SignalFormFieldConfig` | `null` | Stable | Signal form field (Angular 21+). Automatically tracks dirty state when using `[field]` binding. Supports direct signals, signals with properties, and resolution of nested signals. | `[field]="myForm.dateField"` |
45
50
  | `placeholder` | `string \| null` | `'Select Date'` or `'Select Time'` | Stable | Input placeholder text | `placeholder="Choose a date"` |
46
51
  | `inputId` | `string` | `''` | Stable | Custom ID for the input element | `inputId="my-date-input"` |
@@ -59,7 +64,7 @@ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
59
64
  | `timeOnly` | `boolean` | `false` | Stable | Display time picker only (no calendar). Automatically enables `showTime`. | `[timeOnly]="true"` |
60
65
  | `allowTyping` | `boolean` | `false` | Stable | Enable manual typing in the input field. Required for native validation. | `[allowTyping]="true"` |
61
66
  | `displayFormat` | `string` | `null` | Stable | Custom date format string (e.g., 'MM/DD/YYYY'). | `displayFormat="DD.MM.YYYY"` |
62
- | `showCalendarButton` | `boolean` | `true` | Stable | Show/hide the calendar icon button. When `false`, users can still open calendar by clicking the input field. | `[showCalendarButton]="false"` |
67
+ | `showCalendarButton` | `boolean` | `false` | Stable | Show/hide the calendar icon button. When `false`, users can still open calendar by clicking the input field. | `[showCalendarButton]="true"` |
63
68
  | `minuteInterval` | `number` | `1` | Stable | Minute selection interval | `[minuteInterval]="15"` |
64
69
  | `showSeconds` | `boolean` | `false` | Stable | Show seconds in time selection | `[showSeconds]="true"` |
65
70
  | `secondInterval` | `number` | `1` | Stable | Second selection interval (e.g. 1, 5, 15) | `[secondInterval]="5"` |
@@ -2339,6 +2344,27 @@ export function getDaysInMonth(year: number, month: number): number;
2339
2344
  export function getFirstDayOfMonth(year: number, month: number): number;
2340
2345
  ```
2341
2346
 
2347
+ ## Virtual scrolling
2348
+
2349
+ 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.
2350
+
2351
+ ## Animation and reduced motion
2352
+
2353
+ Animation duration and transitions can be configured via `provideDatepickerConfig` or the global config. The component respects the `prefers-reduced-motion` media query when `animations.respectReducedMotion` is `true` (default): transitions are disabled for users who request reduced motion.
2354
+
2355
+ ```typescript
2356
+ import { provideDatepickerConfig, DEFAULT_ANIMATION_CONFIG } from 'ngxsmk-datepicker';
2357
+
2358
+ // In app config or providers
2359
+ provideDatepickerConfig({
2360
+ animations: {
2361
+ ...DEFAULT_ANIMATION_CONFIG,
2362
+ duration: 200,
2363
+ respectReducedMotion: true,
2364
+ },
2365
+ })
2366
+ ```
2367
+
2342
2368
  ## Keyboard Support
2343
2369
 
2344
2370
  The datepicker comes with comprehensive keyboard support:
@@ -1,6 +1,6 @@
1
1
  # Version Compatibility Matrix
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
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
 
@@ -1,19 +1,44 @@
1
1
  # Integration Guides
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  This document provides integration examples for using ngxsmk-datepicker with popular frameworks and libraries.
6
6
 
7
7
  ## Table of Contents
8
8
 
9
+ - [Theming](#theming)
10
+ - [Accessibility](#accessibility)
11
+ - [Input sanitization and CSP](#input-sanitization-and-csp)
9
12
  - [Angular Material](#angular-material)
10
13
  - [Ionic](#ionic)
11
14
  - [Tailwind CSS](#tailwind-css)
12
15
  - [React, Vue, & Vanilla JS (Web Components)](#react-vue--vanilla-js-web-components)
13
16
  - [Modals and overlays](#modals-and-overlays)
14
17
 
18
+ ## Theming
19
+
20
+ Two different mechanisms apply:
21
+
22
+ - **Component input `[theme]`**: Accepts only `'light'` or `'dark'`. Use it to switch the built-in light/dark color set (e.g. `[theme]="'dark'"` or `[theme]="isDark() ? 'dark' : 'light'"`).
23
+ - **ThemeBuilderService.applyTheme(themeObject, element?)**: Accepts a theme **object** (colors, spacing, borderRadius, shadows, etc.) and applies it as CSS variables to the given element (or globally if no element). Use it for custom brand colors and full design tokens. See [THEME-TOKENS.md](THEME-TOKENS.md).
24
+ - When `element` is a **wrapper** (not the `ngxsmk-datepicker` host), the theme is applied to the wrapper and all descendant `ngxsmk-datepicker` elements so library defaults are overridden.
25
+ - Use `theme.shadows.focus` to customize the input focus ring (e.g. `'0 0 0 3px color-mix(in srgb, var(--datepicker-primary-color) 15%, transparent)'`). Internal `--ngxsmk-color-*` variables are bridged from your theme colors automatically.
26
+
27
+ Do not pass a theme object to the `[theme]` input; use `ThemeBuilderService` for that.
28
+
29
+ ## Accessibility
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 – Keyboard Support](API.md#keyboard-support) and the ARIA-related inputs in the API reference.
32
+
33
+ ## Input sanitization and CSP
34
+
35
+ - **Input sanitization**: The library sanitizes user-provided date/time strings (e.g. from the input field) before use: it strips HTML delimiters, script handlers, and dangerous protocols. Template bindings do not use `innerHTML` for user content, so Angular's `DomSanitizer` is not required for normal usage.
36
+ - **CSP**: If your app enforces a Content-Security-Policy, ensure it allows the same directives required by Angular (e.g. `script-src` for your app and Angular, `style-src` for component styles). The datepicker does not use `eval`, inline scripts, or nonce-based scripts; it uses standard Angular templates and styles. No extra CSP directives are required specifically for ngxsmk-datepicker.
37
+
15
38
  ## Angular Material
16
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 add the directive as below.
41
+
17
42
  ### Installation
18
43
 
19
44
  ```bash
@@ -22,6 +47,46 @@ npm install @angular/material @angular/cdk ngxsmk-datepicker
22
47
 
23
48
  ### Basic Integration (Standalone Components)
24
49
 
50
+ **Recommended:** Use the **`ngxsmkMatFormFieldControl`** directive on the datepicker so `mat-form-field` finds it. Add this directive file to your project (e.g. `ngxsmk-mat-form-field.directive.ts`) so only Material apps pull in `@angular/material`:
51
+
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
+ 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
73
+ import { MatFormFieldModule } from '@angular/material/form-field';
74
+
75
+ @Component({
76
+ imports: [MatFormFieldModule, NgxsmkDatepickerComponent, NgxsmkDatepickerMatFormFieldControlDirective, ...],
77
+ template: `
78
+ <mat-form-field appearance="outline">
79
+ <mat-label>Select Date</mat-label>
80
+ <ngxsmk-datepicker ngxsmkMatFormFieldControl [value]="dateControl.value" (valueChange)="dateControl.setValue($event)" ... />
81
+ </mat-form-field>
82
+ `
83
+ })
84
+ ```
85
+
86
+ If you see "mat-form-field must contain a MatFormFieldControl", add the directive to the datepicker host (see Issue #187).
87
+
88
+ **Alternative (legacy / when directive is not used):** In `main.ts` before bootstrap, call `NgxsmkDatepickerComponent.withMaterialSupport(MatFormFieldControl)` (and optionally set `globalThis.__NGXSMK_MAT_FORM_FIELD_CONTROL__ = MatFormFieldControl`). Then use the datepicker inside `mat-form-field` without the directive. Prefer the directive above.
89
+
25
90
  ```typescript
26
91
  import { Component } from '@angular/core';
27
92
  import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
@@ -68,14 +133,16 @@ export class DatepickerComponent {
68
133
  }
69
134
  ```
70
135
 
136
+ **If you see "mat-form-field must contain a MatFormFieldControl":** Add the **`ngxsmkMatFormFieldControl`** directive to the datepicker (Option A above). Do not use `MAT_FORM_FIELD` or pass the wrong token; the directive is the supported path.
137
+
71
138
  ### Integration with Non-Standalone Components (NgModules)
72
139
 
73
- For non-standalone components, you need to provide the Material form field control token using the `provideMaterialFormFieldControl` helper:
140
+ Add the same directive file (see snippet above) to your project, then import it in your NgModule:
74
141
 
75
142
  ```typescript
76
143
  import { NgModule } from '@angular/core';
77
- import { MAT_FORM_FIELD_CONTROL } from '@angular/material/form-field';
78
- import { NgxsmkDatepickerComponent, provideMaterialFormFieldControl } from 'ngxsmk-datepicker';
144
+ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
145
+ import { NgxsmkDatepickerMatFormFieldControlDirective } from './ngxsmk-mat-form-field.directive'; // your local file
79
146
  import { MatFormFieldModule } from '@angular/material/form-field';
80
147
  import { MatInputModule } from '@angular/material/input';
81
148
  import { ReactiveFormsModule } from '@angular/forms';
@@ -83,15 +150,17 @@ import { ReactiveFormsModule } from '@angular/forms';
83
150
  @NgModule({
84
151
  imports: [
85
152
  NgxsmkDatepickerComponent,
153
+ NgxsmkDatepickerMatFormFieldControlDirective,
86
154
  MatFormFieldModule,
87
155
  MatInputModule,
88
156
  ReactiveFormsModule
89
- ],
90
- providers: [provideMaterialFormFieldControl(MAT_FORM_FIELD_CONTROL)]
157
+ ]
91
158
  })
92
159
  export class MyModule { }
93
160
  ```
94
161
 
162
+ Use `ngxsmkMatFormFieldControl` on the datepicker in your templates.
163
+
95
164
  Then use it in your component:
96
165
 
97
166
  ```typescript
@@ -161,9 +230,8 @@ export class MaterialFormComponent {
161
230
  ### With Material Datepicker Styling
162
231
 
163
232
  ```typescript
164
- import { Component } from '@angular/core';
233
+ import { Component, inject, ElementRef } from '@angular/core';
165
234
  import { NgxsmkDatepickerComponent, ThemeBuilderService } from 'ngxsmk-datepicker';
166
- import { inject } from '@angular/core';
167
235
 
168
236
  @Component({
169
237
  selector: 'app-material-datepicker',
@@ -174,7 +242,7 @@ import { inject } from '@angular/core';
174
242
  <ngxsmk-datepicker
175
243
  [value]="selectedDate"
176
244
  (valueChange)="selectedDate = $event"
177
- [theme]="materialTheme"
245
+ theme="light"
178
246
  [classes]="materialClasses">
179
247
  </ngxsmk-datepicker>
180
248
  </div>
@@ -203,6 +271,7 @@ import { inject } from '@angular/core';
203
271
  })
204
272
  export class MaterialDatepickerComponent {
205
273
  private themeBuilder = inject(ThemeBuilderService);
274
+ private hostEl = inject(ElementRef).nativeElement;
206
275
  selectedDate: Date | null = null;
207
276
 
208
277
  materialTheme = {
@@ -214,12 +283,13 @@ export class MaterialDatepickerComponent {
214
283
  border: '#e0e0e0',
215
284
  hover: '#f5f5f5'
216
285
  },
217
- borderRadius: {
218
- md: '4px',
219
- lg: '8px'
220
- }
286
+ borderRadius: { md: '4px', lg: '8px' }
221
287
  };
222
288
 
289
+ ngOnInit() {
290
+ this.themeBuilder.applyTheme(this.materialTheme, this.hostEl);
291
+ }
292
+
223
293
  materialClasses = {
224
294
  wrapper: 'material-datepicker',
225
295
  inputGroup: 'material-input-group',
@@ -1,6 +1,6 @@
1
1
  # Ionic Framework Integration Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  This guide provides step-by-step instructions for integrating ngxsmk-datepicker with Ionic Angular applications.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Ionic Integration Testing Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  This document provides comprehensive testing instructions for verifying ngxsmk-datepicker compatibility with Ionic Framework.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Locale Packs & i18n Contributor Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  Guide for adding locale support and contributing translations to ngxsmk-datepicker.
6
6
 
@@ -14,8 +14,8 @@ The component uses the `locale` input property to determine:
14
14
  - Month names
15
15
  - Weekday names
16
16
  - Week start day
17
- - Date formatting
18
- - Number formatting
17
+ - Date formatting (locale-aware when using Intl; override with `[displayFormat]` for custom patterns)
18
+ - Number formatting (locale-aware via `formatLocaleNumber` and translation registry)
19
19
 
20
20
  ```typescript
21
21
  <ngxsmk-datepicker [locale]="'en-US'"></ngxsmk-datepicker>
@@ -1,6 +1,6 @@
1
1
  # Plugin Architecture
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  ngxsmk-datepicker features a powerful **plugin architecture** that allows you to extend and customize the component's behavior without modifying its core code. This architecture is built on a **hook-based system** that provides extension points throughout the component's lifecycle.
6
6
 
package/docs/SEO.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SEO Optimization Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  This document outlines the SEO optimizations implemented for ngxsmk-datepicker to improve search engine visibility and discoverability.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Server-Side Rendering (SSR) Example
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  Complete example demonstrating ngxsmk-datepicker with Angular Universal (SSR).
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Theme Tokens & CSS Custom Properties
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  Complete reference for all CSS custom properties (CSS variables) available in ngxsmk-datepicker.
6
6
 
package/docs/TIMEZONE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Timezone Support
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  ## Overview
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Extension Points and Hooks
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  ngxsmk-datepicker provides comprehensive extension points through the `hooks` input, allowing you to customize rendering, validation, keyboard shortcuts, formatting, and event handling.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Signal Forms Integration
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  This guide covers using ngxsmk-datepicker with Angular 21+ Signal Forms API.
6
6
 
package/docs/signals.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Signals Integration Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  ngxsmk-datepicker is fully compatible with Angular Signals, providing seamless integration with both traditional reactive forms and modern signal-based patterns.
6
6
 
package/docs/ssr.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Server-Side Rendering (SSR) Guide
2
2
 
3
- **Last updated:** February 25, 2026 · **Current stable:** v2.2.0
3
+ **Last updated:** March 9, 2026 · **Current stable:** v2.2.3
4
4
 
5
5
  ngxsmk-datepicker is fully compatible with Angular Universal and server-side rendering. This guide covers SSR setup, best practices, and troubleshooting.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngxsmk-datepicker",
3
- "version": "2.2.0",
3
+ "version": "2.2.3",
4
4
  "author": {
5
5
  "name": "Sachin Dilshan",
6
6
  "url": "https://www.linkedin.com/in/sachindilshan/"
@@ -81,13 +81,6 @@
81
81
  "exports": {
82
82
  "./styles/*": {
83
83
  "default": "./styles/*"
84
- },
85
- "./package.json": {
86
- "default": "./package.json"
87
- },
88
- ".": {
89
- "types": "./types/ngxsmk-datepicker.d.ts",
90
- "default": "./fesm2022/ngxsmk-datepicker.mjs"
91
84
  }
92
85
  }
93
86
  }
@@ -64,7 +64,6 @@ ion-content .ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-con
64
64
 
65
65
  /* Alternative: Use inline mode in ion-content (recommended) */
66
66
 
67
-
68
67
  /* ============================================
69
68
  4. SAFE AREA INSETS (iOS)
70
69
  ============================================ */
@@ -116,7 +115,6 @@ ion-app.ion-theme-dark ngxsmk-datepicker {
116
115
 
117
116
  /* Allow Ionic gestures to work when datepicker is in inline mode */
118
117
 
119
-
120
118
  /* Prevent touch event conflicts in popover mode */
121
119
  .ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
122
120
  /* Ionic gestures may be blocked - use inline mode instead */
@@ -130,14 +128,12 @@ ion-app.ion-theme-dark ngxsmk-datepicker {
130
128
 
131
129
  /* When inside ion-modal, let Ionic handle focus */
132
130
 
133
-
134
131
  /* ============================================
135
132
  8. KEYBOARD BEHAVIOR
136
133
  ============================================ */
137
134
 
138
135
  /* Prevent keyboard from covering datepicker on iOS */
139
136
  @supports (-webkit-touch-callout: none) {
140
-
141
137
  /* iOS Safari */
142
138
  .ngxsmk-popover-container.ngxsmk-popover-open:not(.ngxsmk-inline-container) {
143
139
  /* Adjust position when keyboard is visible */
@@ -151,7 +147,6 @@ ion-app.ion-theme-dark ngxsmk-datepicker {
151
147
 
152
148
  /* Ensure variables cascade into Shadow DOM */
153
149
 
154
-
155
150
  /* Global variables for Shadow DOM */
156
151
  :root {
157
152
  --datepicker-primary-color: var(--ion-color-primary, #6d28d9);
@@ -182,7 +177,6 @@ ion-item ngxsmk-datepicker .ngxsmk-input-group {
182
177
 
183
178
  /* On mobile, prefer inline mode in Ionic */
184
179
 
185
-
186
180
  /* ============================================
187
181
  12. CAPACITOR SPECIFIC
188
182
  ============================================ */
@@ -223,4 +217,4 @@ ion-item ngxsmk-datepicker .ngxsmk-input-group {
223
217
  max-width: 100% !important;
224
218
  border-radius: 0 !important;
225
219
  margin: 0 !important;
226
- }
220
+ }