ngxsmk-datepicker 2.3.0 → 2.3.1

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/MIGRATION.md ADDED
@@ -0,0 +1,1794 @@
1
+ # Migration Guide
2
+
3
+ This document provides migration instructions for upgrading between major versions of ngxsmk-datepicker.
4
+
5
+ **Last updated:** June 3, 2026 - **Current stable:** v2.3.1
6
+
7
+ ## Table of Contents
8
+
9
+ - [v2.2.15 → v2.3.1](#v2215---v231)
10
+ - [v2.2.7 → v2.2.11](#v227---v228)
11
+ - [v2.2.6 → v2.2.7](#v226---v227)
12
+ - [v2.2.3 → v2.2.6](#v223---v226)
13
+ - [v2.2.0 → v2.2.3](#v220---v223)
14
+ - [v2.1.8 → v2.2.0](#v218---v219)
15
+ - [v2.1.7 → v2.1.8](#v217---v218)
16
+ - [v2.1.6 → v2.1.7](#v216---v217)
17
+ - [v2.1.5 → v2.1.6](#v215---v216)
18
+ - [v2.1.4 → v2.1.5](#v214---v215)
19
+ - [v2.1.3 → v2.1.4](#v213---v214)
20
+ - [v2.1.2 → v2.1.3](#v212---v213)
21
+ - [v2.1.1 → v2.1.2](#v211---v212)
22
+ - [v2.0.11 → v2.1.1](#v2011---v211)
23
+ - [v2.0.6 → v2.0.7](#v206---v207)
24
+ - [v2.0.5 → v2.0.6](#v205---v206)
25
+ - [v2.0.4 → v2.0.5](#v204---v205)
26
+ - [v2.0.3 → v2.0.4](#v203---v204)
27
+ - [v2.0.2 → v2.0.3](#v202---v203)
28
+ - [v2.0.1 → v2.0.2](#v201---v202)
29
+ - [v2.0.0 → v2.0.1](#v200---v201)
30
+ - [v1.9.30 → v2.0.0](#v1930---v200)
31
+ - [v1.9.29 → v1.9.30](#v1929---v1930)
32
+ - [v1.9.27 → v1.9.28](#v1927---v1928)
33
+ - [v1.9.26 → v1.9.27](#v1926---v1927)
34
+ - [v1.9.25 → v1.9.26](#v1925---v1926)
35
+ - [v1.9.23 → v1.9.25](#v1923---v1925)
36
+ - [v1.9.22 → v1.9.23](#v1922---v1923)
37
+ - [v1.9.21 → v1.9.22](#v1921---v1922)
38
+ - [v1.9.20 → v1.9.21](#v1920---v1921)
39
+ - [v1.9.19 → v1.9.20](#v1919---v1920)
40
+ - [v1.9.18 → v1.9.19](#v1918---v1919)
41
+ - [v1.9.17 → v1.9.18](#v1917---v1918)
42
+ - [v1.9.16 → v1.9.17](#v1916---v1917)
43
+ - [v1.9.15 → v1.9.16](#v1915---v1916)
44
+ - [v1.9.14 → v1.9.15](#v1914---v1915)
45
+ - [v1.9.13 → v1.9.14](#v1913---v1914)
46
+ - [v1.9.12 → v1.9.13](#v1912---v1913)
47
+ - [v1.9.11 → v1.9.12](#v1911---v1912)
48
+ - [v1.9.10 → v1.9.11](#v1910---v1911)
49
+ - [v1.9.9 → v1.9.10](#v199---v1910)
50
+ - [v1.9.8 → v1.9.9](#v198---v199)
51
+ - [v1.9.7 → v1.9.8](#v197---v198)
52
+ - [v1.9.6 → v1.9.7](#v196---v197)
53
+ - [v1.9.5 → v1.9.6](#v195---v196)
54
+ - [v1.9.4 → v1.9.5](#v194---v195)
55
+ - [v1.9.3 → v1.9.4](#v193---v194)
56
+ - [v1.9.2 → v1.9.3](#v192---v193)
57
+ - [v1.9.1 → v1.9.2](#v191---v192)
58
+ - [v1.9.0 → v1.9.1](#v190---v191)
59
+ - [v1.8.0 → v1.9.0](#v180---v190)
60
+ - [v1.7.0 → v1.8.0](#v170---v180)
61
+
62
+ ## v2.2.15 → v2.3.1
63
+
64
+ ### Changes
65
+
66
+ - **Natural Language Input**: Standard text inputs can now resolve relative expressions (e.g. "today", "tomorrow", relative day/week/month/year offsets, quarter descriptors). Controlled via `[enableNaturalLanguage]` and emits via `(naturalLanguageResolved)`.
67
+ - **Multi-Calendar Layouts**: Support for showing 2 or 3 calendars side-by-side via `[calendars]`.
68
+ - **Dynamic Presets**: Supply a custom preset callback via `[rangePresetFactory]`.
69
+ - **Timezone Selection**: Searchable timezone selection dropdown via `[showTimezoneSelector]`.
70
+ - **Range Warnings**: Emits `(invalidRange)` if a range contains disabled dates.
71
+
72
+ ### Migration Steps
73
+
74
+ No breaking changes. Upgrade with:
75
+
76
+ ```bash
77
+ npm install ngxsmk-datepicker@2.3.1
78
+ ```
79
+
80
+ ## npm: skip v2.2.12
81
+
82
+ The **`2.2.12`** package on the registry is missing **`fesm2022/`** and **`types/`**. Stay on **`2.2.11`** or upgrade to **`2.3.1`** (or newer) once published ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
83
+
84
+ ```bash
85
+ npm install ngxsmk-datepicker@2.3.1
86
+ ```
87
+
88
+ ## v2.2.7 → v2.2.11
89
+
90
+ ### Changes
91
+
92
+ - **npm package**: The `2.2.7` tarball on the registry omitted `fesm2022/` and `types/`. **2.2.11** republishes the same library with a complete build. No API or feature changes versus the intended 2.2.7 release.
93
+
94
+ ### Migration Steps
95
+
96
+ No breaking changes.
97
+
98
+ ```bash
99
+ npm install ngxsmk-datepicker@2.3.1
100
+ ```
101
+
102
+ ## v2.2.6 → v2.2.7
103
+
104
+ ### Changes
105
+
106
+ - **Publishing**: npm releases again ship compiled Angular library output (`fesm2022/`, `types/`).
107
+ - **Range mode**: Optional `[allowSameDay]="true"` to complete a range when start and end are the same calendar day.
108
+
109
+ ### Migration Steps
110
+
111
+ No breaking changes. Use **2.2.11** on npm (the `2.2.7` npm package was incomplete; 2.2.11 matches the intended 2.2.7 release).
112
+
113
+ ```bash
114
+ npm install ngxsmk-datepicker@2.3.1
115
+ ```
116
+
117
+ ## v2.2.3 → v2.2.6
118
+
119
+ ### Changes
120
+
121
+ - **Timezone Support**: Added full support for IANA timezones in "Today" calculation. The component now correctly identifies "Today" based on the configured `timezone` input rather than just browser local time.
122
+ - **Date Validation**: Fixed an issue where "Today" could become unselectable if `minDate` was set to the current time later in the day. `minDate` validation now correctly normalizes to the start of the day.
123
+ - **Keyboard Shortcuts**: Updated `selectToday` shortcut to use the timezone-aware `today` value.
124
+
125
+ ### Migration Steps
126
+
127
+ No migration steps required.
128
+
129
+ ```bash
130
+ npm install ngxsmk-datepicker@2.2.6
131
+ ```
132
+
133
+ ## v2.2.0 → v2.2.3
134
+
135
+ ### Changes
136
+
137
+ - **Code Quality**: Refactored static Material support methods to reduce cognitive complexity and nesting depth (ESLint `S3776`, `S2004`).
138
+ - **Improved Coverage**: Increased function coverage to ~68.2% through new internal test suites.
139
+ - **Stability**: Fixed regression in touch/swipe event stubs and Material Form Field integration state.
140
+ - **Maintenance**: Marked `_allInstances` as `readonly` and removed redundant `demo` script.
141
+
142
+ ### Migration Steps
143
+
144
+ No migration steps required.
145
+
146
+ ```bash
147
+ npm install ngxsmk-datepicker@2.2.3
148
+ ```
149
+
150
+ ## v2.1.8 → v2.2.0
151
+
152
+ ### Changes
153
+
154
+ - **Header Select Synchronization**: Migrated header components to `ViewEncapsulation.None` and consolidated styles into `_header.scss`.
155
+ - **Improved Dropdown Layout**: Professional `space-between` layout for Month/Year selectors.
156
+ - **Enhanced Visibility**: High-contrast text for non-selected dropdown options.
157
+ - **Web Component Support**: New capability to compile/export as a Universal Custom Web Component for React, Vue, & Vanilla JS.
158
+ - **Performance**: Reduced calendar opening timers for faster feedback (150ms mobile / 60ms desktop).
159
+
160
+ ### Migration Steps
161
+
162
+ No migration steps required.
163
+
164
+ ```bash
165
+ npm install ngxsmk-datepicker@2.2.0
166
+ ```
167
+
168
+ ## v2.1.7 → v2.1.8
169
+
170
+ ### Changes
171
+
172
+ - **Fixed**: **appendToBody** popover positioning (Issue #206).
173
+ - **Fixed**: Datepicker in modal positioning fixes.
174
+ - **Changed**: Reduced loading/opening delays and CSS cleanup.
175
+
176
+ ### Migration Steps
177
+
178
+ No migration steps required.
179
+
180
+ ```bash
181
+ npm install ngxsmk-datepicker@2.1.8
182
+ ```
183
+
184
+ ## v2.1.6 → v2.1.7
185
+
186
+ ### Changes
187
+
188
+ - **Version Update**: Updated to version 2.1.7.
189
+ - **Fixed**: Resolved `No provider for DatePipe` runtime error. The library is now fully self-contained regarding `DatePipe` usage.
190
+ - No breaking changes.
191
+
192
+ ### Migration Steps
193
+
194
+ No migration steps required. If you previously added `DatePipe` to your `app.config.ts` or `AppModule` providers solely for this library, you can now safely remove it.
195
+
196
+ ```bash
197
+ npm install ngxsmk-datepicker@2.1.7
198
+ ```
199
+
200
+ ## v2.1.5 → v2.1.6
201
+
202
+ ### Changes
203
+
204
+ - **Version Update**: Updated to version 2.1.6.
205
+ - No breaking changes.
206
+
207
+ ### Migration Steps
208
+
209
+ No migration steps required.
210
+
211
+ ```bash
212
+ npm install ngxsmk-datepicker@2.1.6
213
+ ```
214
+
215
+ ## v2.1.4 → v2.1.5
216
+
217
+ ### Changes
218
+
219
+ - **Version Update**: Updated to version 2.1.5.
220
+ - **New**: User-facing validation messages (i18n) for invalid date, date before min, date after max; calendar loading state (visual + a11y); installation options doc and demo page updates; demo light/dark theme fix; optional issue-reproduction app. Service refactors (calendar generation, parsing) are internal.
221
+ - No breaking changes.
222
+
223
+ ### Migration Steps
224
+
225
+ No migration steps required.
226
+
227
+ ```bash
228
+ npm install ngxsmk-datepicker@2.1.5
229
+ ```
230
+
231
+ ## v2.1.3 → v2.1.4
232
+
233
+ ### Changes
234
+
235
+ - **Version Update**: Updated to version 2.1.4.
236
+ - **Improved Calendar Grid**: Calendar now always generates exactly 42 days (6 full weeks), providing layout stability during month navigation.
237
+ - **Enhanced Playground**: New options for `minDate`, `maxDate`, and `weekStart` constraints.
238
+ - No breaking changes.
239
+
240
+ ### Migration Steps
241
+
242
+ No migration steps required.
243
+
244
+ ```bash
245
+ npm install ngxsmk-datepicker@2.1.4
246
+ ```
247
+
248
+ ## v2.1.2 → v2.1.3
249
+
250
+ ### Changes
251
+
252
+ - **Version Update**: Updated to version 2.1.3.
253
+ - **Bug Fix**: Fixed inline datepicker width issue where it was constrained by container styles in some contexts. The inline mode now correctly fit its content.
254
+ - No breaking changes.
255
+
256
+ ### Migration Steps
257
+
258
+ No migration steps required.
259
+
260
+ ```bash
261
+ npm install ngxsmk-datepicker@2.1.3
262
+ ```
263
+
264
+
265
+ ## v2.1.1 → v2.1.2
266
+
267
+ ### Changes
268
+
269
+ - **Version Update**: Updated to version 2.1.2.
270
+ - **Circular Dependency Fix**: Resolved `RuntimeError: NG0200` when using forms by removing `NG_VALUE_ACCESSOR` from providers. This might require verifying your form integration if you were relying on side-effects of the previous implementation.
271
+ - **UI Refresh**: Implemented a "border detox" and refined aesthetics.
272
+ - **Removed Feature**: The range duration header (which displayed "X Days" during range selection) has been removed.
273
+ - **Mobile Stabilization**: Critical fixes for mobile browsers.
274
+
275
+ No migration steps required.
276
+
277
+ ```bash
278
+ npm install ngxsmk-datepicker@latest
279
+ ```
280
+
281
+
282
+ ## v2.0.11 → v2.1.1
283
+
284
+ ### ⚠️ CRITICAL NOTICE
285
+
286
+ **Versions 2.0.10 and 2.0.11 are broken and should NOT be used.**
287
+
288
+ These versions have critical package configuration issues that prevent proper TypeScript module resolution. If you have installed either of these versions, please upgrade to v2.1.1 immediately.
289
+
290
+ ### Changes
291
+
292
+ - **Package Fixes**: Corrected TypeScript declaration paths and package configuration
293
+ - Fixed `types` and `typings` fields to point to the correct location: `types/ngxsmk-datepicker.d.ts`
294
+ - Simplified exports configuration to match stable v2.0.9 format
295
+ - Removed disallowed `esm2022` property from package.json
296
+ - **No Breaking Changes**: This is a minor version update with package configuration improvements
297
+ - **Recommended Update**: All v2.0.x users should update to v2.1.1 for proper TypeScript support
298
+ - **Skip 2.0.10 & 2.0.11**: These versions have been unpublished from npm due to broken package configuration
299
+
300
+ ### Migration Steps
301
+
302
+ Update your package.json to use the new version:
303
+
304
+ ```bash
305
+ npm install ngxsmk-datepicker@2.1.1
306
+ ```
307
+
308
+ **No code changes required.** This update only fixes package configuration issues that were preventing proper TypeScript declaration file resolution.
309
+
310
+ ### What's Fixed
311
+
312
+ If you were experiencing the following error:
313
+
314
+ ```
315
+ Could not find a declaration file for module 'ngxsmk-datepicker'
316
+ ```
317
+
318
+ This is now resolved in v2.1.1. The package now correctly points to its TypeScript declaration files.
319
+
320
+ ## v2.0.7 → v2.0.8
321
+
322
+ ### Changes
323
+
324
+ - **Version Update**: Updated to version 2.0.8
325
+ - **Ionic Integration**: Added automatic CSS variable support for seamless theming in Ionic apps
326
+ - **Optimized Change Detection**: Switched to Signal-based updates for better performance
327
+ - **Mobile UX Fixes**: Fixed page jumping on date selection and improved dropdown scrolling
328
+ - No breaking changes.
329
+
330
+ ### Migration Steps
331
+
332
+ No migration steps required. This is a patch version update:
333
+
334
+ ```bash
335
+ npm install ngxsmk-datepicker@2.0.8
336
+ ```
337
+
338
+ ## v2.0.6 → v2.0.7
339
+
340
+ ### Changes
341
+
342
+ - **Version Update**: Updated to version 2.0.7
343
+ - No breaking changes.
344
+
345
+ ### Migration Steps
346
+
347
+ No migration steps required. This is a patch version update:
348
+
349
+ ```bash
350
+ npm install ngxsmk-datepicker@2.0.7
351
+ ```
352
+
353
+ ## v2.0.5 → v2.0.6
354
+
355
+ ### Changes
356
+
357
+ - **Enhanced Range Picker Reselection**: Improved comprehensive range reselection behavior
358
+ - Clicking the start date when a complete range is selected now clears only the end date
359
+ - Clicking the end date when a complete range is selected now clears the start date and sets the end date as the new start date
360
+ - **NEW**: Clicking any date within the selected range now clears the end date and sets the clicked date as the new start date
361
+ - Allows users to easily redefine date ranges from any point (start, end, or within the range)
362
+ - **Code Cleanup**: Removed unnecessary inline comments from range selection logic for cleaner, more maintainable code
363
+ - No breaking changes.
364
+
365
+ ### Migration Steps
366
+
367
+ No migration steps required. This is a patch version update:
368
+
369
+ ```bash
370
+ npm install ngxsmk-datepicker@2.0.6
371
+ ```
372
+
373
+ ## v2.0.4 -> v2.0.5
374
+
375
+ ### Changes
376
+
377
+ - **Documentation**: Added "Form Validation" section to clarify `readonly` input behavior and `allowTyping` workaround.
378
+ - General updates and improvements.
379
+ - No breaking changes.
380
+
381
+ ## v2.0.3 → v2.0.4
382
+
383
+ ### Changes
384
+
385
+ - Bug fix: Fixed `touched` state sync for Signal Forms validation.
386
+ - No breaking changes.
387
+
388
+ ## v2.0.2 → v2.0.3
389
+
390
+ ### Changes
391
+
392
+ - Bug fixes: #136, #112, #84, #71 verified.
393
+ - Code cleanup in `field-sync.service.ts`.
394
+ - No breaking changes.
395
+
396
+ ## v2.0.1 → v2.0.2
397
+
398
+ ### Changes
399
+
400
+ - Documentation updates to reflect new version
401
+
402
+ ## v2.0.0 → v2.0.1
403
+
404
+ ### Changes
405
+
406
+ - Bug fixes and improvements
407
+
408
+ ## v1.9.30 → v2.0.0
409
+
410
+ ### Overview
411
+
412
+ v2.0.0 is a major version update representing significant architectural improvements, enhanced features, and modernization of the codebase. While maintaining backward compatibility for most features, some breaking changes are necessary for improved performance, type safety, and Angular alignment.
413
+
414
+ ### Breaking Changes
415
+
416
+ #### 1. Angular Version Requirement
417
+
418
+ **Change**: Minimum Angular version updated to 17.0.0+
419
+
420
+ **Reason**: To leverage modern Angular features (signals, standalone components, built-in control flow)
421
+
422
+ **Migration**:
423
+
424
+ ```bash
425
+ # Update Angular to v17+
426
+ ng update @angular/core@17 @angular/cli@17
427
+
428
+ # Then update ngxsmk-datepicker
429
+ npm install ngxsmk-datepicker@2.0.0
430
+ ```
431
+
432
+ #### 2. Signal Forms Integration
433
+
434
+ **Change**: Enhanced Signal Forms API with stricter typing
435
+
436
+ **Before** (v1.x):
437
+
438
+ ```typescript
439
+ // Signal form field with loose typing
440
+ [field] = "mySignalFormField";
441
+ ```
442
+
443
+ **After** (v2.0):
444
+
445
+ ```typescript
446
+ // Import SignalFormFieldConfig for type safety
447
+ import { SignalFormFieldConfig } from "ngxsmk-datepicker";
448
+
449
+ // Signal form field with strict typing
450
+ [field] = "mySignalFormField"; // Now with proper type inference
451
+ ```
452
+
453
+ **Migration**: No code changes required, but TypeScript will now catch type errors earlier.
454
+
455
+ #### 3. Timezone Utilities API
456
+
457
+ **Change**: Improved timezone utility function signatures for type safety
458
+
459
+ **Before** (v1.x):
460
+
461
+ ```typescript
462
+ // Loose parameter types
463
+ formatDateWithTimezone(date, locale, options, timezone);
464
+ ```
465
+
466
+ **After** (v2.0):
467
+
468
+ ```typescript
469
+ // Strict parameter types with proper interfaces
470
+ formatDateWithTimezone(
471
+ date: Date,
472
+ locale: string,
473
+ options: Intl.DateTimeFormatOptions,
474
+ timezone?: string
475
+ ): string;
476
+ ```
477
+
478
+ **Migration**: Ensure you're passing correctly typed parameters to timezone utilities.
479
+
480
+ #### 4. Deprecated Properties Removed
481
+
482
+ **Change**: Removed properties deprecated in v1.9.x
483
+
484
+ **Removed**:
485
+
486
+ - `numberOfMonths` (use `calendarCount` instead - deprecated since v1.9.12)
487
+
488
+ **Migration**:
489
+
490
+ ```typescript
491
+ // Before (v1.x)
492
+ <ngxsmk-datepicker [numberOfMonths]="2"></ngxsmk-datepicker>
493
+
494
+ // After (v2.0)
495
+ <ngxsmk-datepicker [calendarCount]="2"></ngxsmk-datepicker>
496
+ ```
497
+
498
+ #### 5. Service Extraction
499
+
500
+ **Change**: Internal architecture refactored - services extracted from main component
501
+
502
+ **Impact**: If you were extending or monkey-patching internal component methods, this may break.
503
+
504
+ **Affected Internal Services**:
505
+
506
+ - `CalendarGenerationService` - Calendar generation logic
507
+ - `DatepickerParsingService` - Date parsing and formatting
508
+ - `TouchGestureHandlerService` - Touch gesture handling
509
+ - `PopoverPositioningService` - Popover positioning
510
+
511
+ **Migration**: Use public APIs instead of internal methods. If you need access to these services, inject them:
512
+
513
+ ```typescript
514
+ import { CalendarGenerationService } from 'ngxsmk-datepicker';
515
+
516
+ constructor(private calendarService: CalendarGenerationService) {}
517
+ ```
518
+
519
+ ### New Features
520
+
521
+ #### 1. Enhanced Time Selection
522
+
523
+ ```typescript
524
+ // Time range mode
525
+ <ngxsmk-datepicker
526
+ [timeRangeMode]="true"
527
+ [showTime]="true"
528
+ ></ngxsmk-datepicker>
529
+
530
+ // Seconds support (already available, now documented)
531
+ <ngxsmk-datepicker
532
+ [showSeconds]="true"
533
+ [secondInterval]="5"
534
+ ></ngxsmk-datepicker>
535
+
536
+ // Step configuration
537
+ <ngxsmk-datepicker
538
+ [minuteInterval]="15"
539
+ [secondInterval]="30"
540
+ ></ngxsmk-datepicker>
541
+ ```
542
+
543
+ #### 2. Internationalization Improvements
544
+
545
+ ```typescript
546
+ // Custom date format patterns
547
+ import { CustomDateFormatService } from "ngxsmk-datepicker";
548
+
549
+ customFormat.format(date, "YYYY-MM-DD HH:mm:ss", "en-US");
550
+
551
+ // Locale-aware number formatting
552
+ import { formatLocaleNumber } from "ngxsmk-datepicker";
553
+
554
+ formatLocaleNumber(42, "de-DE"); // "42"
555
+ ```
556
+
557
+ #### 3. Animation API
558
+
559
+ ```typescript
560
+ // Configure animations
561
+ <ngxsmk-datepicker
562
+ [animationConfig]="{
563
+ duration: 200,
564
+ easing: 'ease-in-out',
565
+ enabled: true
566
+ }"
567
+ ></ngxsmk-datepicker>
568
+
569
+ // Respects prefers-reduced-motion automatically
570
+ ```
571
+
572
+ #### 4. Multi-Calendar Sync Scrolling
573
+
574
+ ```typescript
575
+ // Synchronized scrolling for multi-calendar layouts
576
+ <ngxsmk-datepicker
577
+ [calendarCount]="2"
578
+ [syncScroll]="true"
579
+ [monthGap]="1"
580
+ ></ngxsmk-datepicker>
581
+ ```
582
+
583
+ ### Performance Improvements
584
+
585
+ #### 1. Virtual Scrolling
586
+
587
+ Year and decade views now use virtual scrolling for better performance with large date ranges:
588
+
589
+ ```typescript
590
+ // Automatically enabled for year/decade views
591
+ // Handles 100+ years efficiently
592
+ <ngxsmk-datepicker [currentView]="'year'"></ngxsmk-datepicker>
593
+ ```
594
+
595
+ #### 2. Signal-Based Reactivity
596
+
597
+ Change detection is now automatic and more efficient:
598
+
599
+ ```typescript
600
+ // Automatically optimized - no manual change detection needed
601
+ component.selectedDate.set(new Date());
602
+ ```
603
+
604
+ #### 3. Lazy Loading
605
+
606
+ Multi-month calendars are now lazily rendered:
607
+
608
+ ```typescript
609
+ // Only visible calendars + buffer are rendered
610
+ <ngxsmk-datepicker [calendarCount]="12"></ngxsmk-datepicker>
611
+ ```
612
+
613
+ ### Testing Infrastructure
614
+
615
+ New testing utilities are available:
616
+
617
+ ```typescript
618
+ // Accessibility testing
619
+ import { runAccessibilityScan } from "ngxsmk-datepicker/testing";
620
+
621
+ // Performance benchmarking
622
+ import { measureSync, benchmark } from "ngxsmk-datepicker/testing";
623
+
624
+ // Visual regression testing
625
+ import { captureElementScreenshot, compareImageData } from "ngxsmk-datepicker/testing";
626
+ ```
627
+
628
+ ### Documentation Updates
629
+
630
+ - ✅ Complete API reference with JSDoc
631
+ - ✅ Enhanced accessibility guide
632
+ - ✅ Performance testing guide
633
+ - ✅ Visual regression testing guide
634
+ - ✅ Improvement report
635
+
636
+ ### Migration Steps
637
+
638
+ 1. **Update Angular** (if needed):
639
+
640
+ ```bash
641
+ ng update @angular/core@17 @angular/cli@17
642
+ ```
643
+
644
+ 2. **Update ngxsmk-datepicker**:
645
+
646
+ ```bash
647
+ npm install ngxsmk-datepicker@2.0.0
648
+ ```
649
+
650
+ 3. **Replace deprecated properties**:
651
+
652
+ ```typescript
653
+ // Replace numberOfMonths with calendarCount
654
+ [numberOfMonths]="2" → [calendarCount]="2"
655
+ ```
656
+
657
+ 4. **Update imports** (if using internal services):
658
+
659
+ ```typescript
660
+ // Use public APIs instead of internal methods
661
+ import { CalendarGenerationService } from "ngxsmk-datepicker";
662
+ ```
663
+
664
+ 5. **Test thoroughly**:
665
+ - Test all date selection modes
666
+ - Test time selection
667
+ - Test keyboard navigation
668
+ - Test mobile interactions
669
+ - Run accessibility tests
670
+
671
+ 6. **Verify bundle size**:
672
+ ```bash
673
+ ng build --prod
674
+ # Check bundle analyzer if needed
675
+ ```
676
+
677
+ ### Rollback Instructions
678
+
679
+ If you encounter issues, you can rollback to v1.9.30:
680
+
681
+ ```bash
682
+ npm install ngxsmk-datepicker@1.9.30
683
+ ```
684
+
685
+ ### Support
686
+
687
+ For migration issues or questions:
688
+
689
+ - Check the [README](README.md) for updated examples
690
+ - Review [IMPROVEMENT_REPORT.md](IMPROVEMENT_REPORT.md) for architectural changes
691
+ - Open an issue on GitHub with migration questions
692
+
693
+ ---
694
+
695
+ ## v1.9.29 → v1.9.30
696
+
697
+ ### Installation
698
+
699
+ Update to the latest version:
700
+
701
+ ```bash
702
+ npm install ngxsmk-datepicker@2.0.0
703
+ ```
704
+
705
+ ### Changes
706
+
707
+ - **Signal Form Resolution**: Improved the way signal-based form fields are resolved. The datepicker now correctly handles signals that have field properties attached directly to the signal function.
708
+ - **Improved Validation**: Enhanced detection of `required` state from Signal Forms schema.
709
+ - **Public API**: Exported `SignalFormFieldConfig` for better type safety.
710
+
711
+ ### Breaking Changes
712
+
713
+ None in v2.0.0.
714
+
715
+ ### v1.9.30
716
+
717
+ None in v1.9.30.
718
+
719
+ ### Migration Steps
720
+
721
+ If you are using custom types for Signal Form fields, you can now use the officially exported `SignalFormFieldConfig` interface.
722
+
723
+ ## v1.9.27 → v1.9.28
724
+
725
+ ### Installation
726
+
727
+ Update to the latest version:
728
+
729
+ ```bash
730
+ npm install ngxsmk-datepicker@1.9.28
731
+ ```
732
+
733
+ ### Changes
734
+
735
+ - **Input Attributes**: New `inputId`, `name`, and `autocomplete` inputs are available.
736
+ - **Improved Validation**: The `required` attribute is now correctly reflected on the internal input element when set via form schema.
737
+
738
+ ### Breaking Changes
739
+
740
+ None in v1.9.28.
741
+
742
+ ### Migration Steps
743
+
744
+ No code changes required. The new features are additive.
745
+
746
+ ## v1.9.26 → v1.9.27
747
+
748
+ ### Installation
749
+
750
+ Update to the latest version:
751
+
752
+ ```bash
753
+ npm install ngxsmk-datepicker@1.9.27
754
+ ```
755
+
756
+ ### Changes
757
+
758
+ - **Modern Control Flow**: Components migrated to Angular's built-in `@if` and `@for` blocks.
759
+ - **Improved Resolution**: Resolved static analysis and module resolution issues in monorepos.
760
+
761
+ ### Breaking Changes
762
+
763
+ None in v1.9.27.
764
+
765
+ ### Migration Steps
766
+
767
+ No code changes required. The changes are focused on internal library architecture and build compatibility.
768
+
769
+ ## v1.9.25 → v1.9.26
770
+
771
+ > ⚠️ **Warning**: Version `1.9.26` has broken styles. It is highly recommended to skip this version and upgrade directly to `1.9.27`.
772
+
773
+ ### Installation
774
+
775
+ Update to the latest version:
776
+
777
+ ```bash
778
+ npm install ngxsmk-datepicker@1.9.26
779
+ ```
780
+
781
+ ### Changes
782
+
783
+ - **Core Architecture**: Major internal refactoring to improve maintainability and performance.
784
+ - **Ionic Integration**: Fixed localized style exporting issues.
785
+
786
+ ### Breaking Changes
787
+
788
+ None in v1.9.26.
789
+
790
+ ### Migration Steps
791
+
792
+ No code changes required. The refactoring is internal and maintains full backward compatibility.
793
+
794
+ ## v1.9.23 → v1.9.25
795
+
796
+ ### Installation
797
+
798
+ ```bash
799
+ npm install ngxsmk-datepicker@1.9.25
800
+ ```
801
+
802
+ ### Changes
803
+
804
+ - **Strict Mode**: Improved support for strict template type checking in IDEs.
805
+ - **NPM Package**: Fixed missing README in package distribution.
806
+
807
+ ### Breaking Changes
808
+
809
+ None in v1.9.25.
810
+
811
+ ## v1.9.22 → v1.9.23
812
+
813
+ ### Installation
814
+
815
+ ```bash
816
+ npm install ngxsmk-datepicker@1.9.23
817
+ ```
818
+
819
+ ### Changes
820
+
821
+ - **Signal Forms**: Fixed dirty state tracking for `[field]` binding.
822
+ - **CSS Variables**: Improved theming specificity for global variables.
823
+
824
+ ### Breaking Changes
825
+
826
+ None in v1.9.23.
827
+
828
+ ## v1.9.21 → v1.9.22
829
+
830
+ ### Installation
831
+
832
+ Update to the latest version:
833
+
834
+ ```bash
835
+ npm install ngxsmk-datepicker@1.9.22
836
+ ```
837
+
838
+ ### Changes
839
+
840
+ - **Version Update**: Updated to version 1.9.22
841
+ - **Stable Release**: Version 1.9.22 is the current stable version
842
+
843
+ ### Bug Fixes
844
+
845
+ - **Form Control Value Initialization**: Fixed issue where datepicker was not properly updating the displayed month when initialized with form control values
846
+ - The datepicker now correctly displays the month from form control values instead of defaulting to the current month
847
+ - Added proper signal updates and change detection in `writeValue()` method
848
+ - This fix ensures that when using Reactive Forms with initial date values, the calendar opens to the correct month
849
+ - Example: If a form control has a value of January 2026, the calendar will now open showing January instead of the current month
850
+
851
+ - **Locale Week Start Detection**: Fixed `getFirstDayOfWeek()` function to properly return 1 for en-GB locale and other European locales
852
+ - Added fallback logic for locales where `Intl.Locale.weekInfo` is not available (older browsers/environments)
853
+ - Now correctly returns Monday (1) for en-GB, en-AU, en-NZ, and most European locales
854
+ - Maintains backward compatibility with en-US and other locales that use Sunday (0) as first day
855
+ - All calendar utils tests now passing
856
+
857
+ ### Breaking Changes
858
+
859
+ None in v1.9.22.
860
+
861
+ ### Deprecations
862
+
863
+ None in v1.9.22.
864
+
865
+ ## v1.9.20 → v1.9.21
866
+
867
+ ### Installation
868
+
869
+ Update to the latest version:
870
+
871
+ ```bash
872
+ npm install ngxsmk-datepicker@latest
873
+ ```
874
+
875
+ ### New Features
876
+
877
+ #### Mobile-Specific Features
878
+
879
+ Version 1.9.21 introduces comprehensive mobile optimization:
880
+
881
+ ```typescript
882
+ // Enable native picker on mobile devices (automatic detection)
883
+ <ngxsmk-datepicker
884
+ [useNativePicker]="true"
885
+ [autoDetectMobile]="true"
886
+ [mobileModalStyle]="'bottom-sheet'"
887
+ [enableHapticFeedback]="true">
888
+ </ngxsmk-datepicker>
889
+ ```
890
+
891
+ **New Inputs:**
892
+
893
+ - `useNativePicker`: Enable native date picker on mobile devices
894
+ - `autoDetectMobile`: Automatically detect mobile devices (default: `true`)
895
+ - `mobileModalStyle`: Choose modal style (`'bottom-sheet'`, `'center'`, `'fullscreen'`)
896
+ - `enableHapticFeedback`: Enable haptic feedback for interactions
897
+
898
+ #### Advanced Selection Modes
899
+
900
+ New selection modes extend the existing `mode` input:
901
+
902
+ ```typescript
903
+ // Week selection
904
+ <ngxsmk-datepicker mode="week"></ngxsmk-datepicker>
905
+
906
+ // Month selection
907
+ <ngxsmk-datepicker mode="month"></ngxsmk-datepicker>
908
+
909
+ // Quarter selection
910
+ <ngxsmk-datepicker mode="quarter"></ngxsmk-datepicker>
911
+
912
+ // Year selection
913
+ <ngxsmk-datepicker mode="year"></ngxsmk-datepicker>
914
+ ```
915
+
916
+ #### Enhanced Time Selection
917
+
918
+ Seconds selection is now available:
919
+
920
+ ```typescript
921
+ <ngxsmk-datepicker
922
+ [showTime]="true"
923
+ [showSeconds]="true"
924
+ [secondInterval]="1">
925
+ </ngxsmk-datepicker>
926
+ ```
927
+
928
+ **New Inputs:**
929
+
930
+ - `showSeconds`: Show seconds selector in time picker
931
+ - `secondInterval`: Interval for seconds selection (default: `1`)
932
+
933
+ ### Migration Steps
934
+
935
+ No migration steps required. This is a patch version with new features that are opt-in:
936
+
937
+ 1. **Existing code continues to work**: All existing implementations remain unchanged
938
+ 2. **New features are opt-in**: Mobile features and new selection modes require explicit configuration
939
+ 3. **Backward compatible**: All changes maintain full backward compatibility
940
+
941
+ ### Breaking Changes
942
+
943
+ None. This version is fully backward compatible.
944
+
945
+ ### Compatibility
946
+
947
+ - Angular 17-22
948
+ - All existing features continue to work
949
+ - New features are additive only
950
+
951
+ ## v1.9.15 → v1.9.16
952
+
953
+ ### Fixed
954
+
955
+ - **Range Mode Previous Month Selection**: Fixed issue where users could not select dates from previous months in range mode when starting with `{ start: null, end: null }`
956
+ - Added memo cache invalidation before calendar generation when clicking dates from previous/next months in range mode
957
+ - Fixed issue where clicking dates from previous months would navigate but memoized functions would use stale month/year values
958
+ - Now properly invalidates memo cache in single, range, and multiple modes when navigating to different months via date clicks
959
+ - Users can now select dates from previous months in range mode without issues, allowing proper range selection across month boundaries
960
+
961
+ ### Changed
962
+
963
+ - **Version Update**: Updated to version 1.9.16
964
+ - **Stable Release**: Version 1.9.16 is the current stable version
965
+
966
+ ### Migration Steps
967
+
968
+ No migration steps required. This is a patch version with bug fixes only. Simply update your package version:
969
+
970
+ ```bash
971
+ npm install ngxsmk-datepicker@1.9.16
972
+ ```
973
+
974
+ ### Breaking Changes
975
+
976
+ None in v1.9.16.
977
+
978
+ ### Deprecations
979
+
980
+ None in v1.9.16.
981
+
982
+ ### Notes
983
+
984
+ - This version maintains full backward compatibility with v1.9.15. All existing code will continue to work without modifications.
985
+ - The fix ensures that range mode date pickers work correctly when users click on dates from previous months, especially when starting with null initial values.
986
+
987
+ ## v1.9.20 → v1.9.21
988
+
989
+ ### Changed
990
+
991
+ - **Version Update**: Updated to version 1.9.21
992
+ - **Stable Release**: Version 1.9.21 is the current stable version
993
+
994
+ ### Installation
995
+
996
+ ```bash
997
+ npm install ngxsmk-datepicker@1.9.21
998
+ ```
999
+
1000
+ ### Breaking Changes
1001
+
1002
+ None in v1.9.21.
1003
+
1004
+ ### Deprecations
1005
+
1006
+ None in v1.9.21.
1007
+
1008
+ ### Migration Steps
1009
+
1010
+ - This version maintains full backward compatibility with v1.9.20. All existing code will continue to work without modifications.
1011
+ - No code changes required.
1012
+
1013
+ ## v1.9.19 → v1.9.20
1014
+
1015
+ ### Fixed
1016
+
1017
+ - **Test Environment Compatibility (Issue #71)**: Fixed `TypeError: window.matchMedia is not a function` error in test environments (jsdom/Vitest)
1018
+ - Added error handling for `window.matchMedia` in `applyAnimationConfig()` method
1019
+ - Component now gracefully handles missing `matchMedia` API in test environments
1020
+ - Prevents test failures when running with Vitest and jsdom
1021
+ - Added comprehensive test coverage for `matchMedia` compatibility scenarios
1022
+
1023
+ ### Changed
1024
+
1025
+ - **Version Update**: Updated to version 1.9.20
1026
+ - **Stable Release**: Version 1.9.20 is the current stable version
1027
+
1028
+ ### Installation
1029
+
1030
+ ```bash
1031
+ npm install ngxsmk-datepicker@1.9.20
1032
+ ```
1033
+
1034
+ ### Breaking Changes
1035
+
1036
+ None in v1.9.20.
1037
+
1038
+ ### Deprecations
1039
+
1040
+ None in v1.9.20.
1041
+
1042
+ ### Migration Steps
1043
+
1044
+ - This version maintains full backward compatibility with v1.9.19. All existing code will continue to work without modifications.
1045
+ - No code changes required.
1046
+ - Fixes test compatibility issues with Vitest and jsdom environments.
1047
+
1048
+ ## v1.9.18 → v1.9.19
1049
+
1050
+ ### Added
1051
+
1052
+ - **Comprehensive Responsive Layout Redesign**: Complete redesign of demo project layout for all screen sizes
1053
+ - Redesigned navbar for all breakpoints (320px-374px, 375px-479px, 480px-599px, 600px-767px, 768px-1023px, 1024px+)
1054
+ - Enhanced sidebar navigation with mobile drawer, tablet collapsible, and desktop fixed layouts
1055
+ - Responsive hero section with adaptive typography and button layouts
1056
+ - Feature grid responsive design (1 column → 2 columns → 3 columns → 4 columns)
1057
+ - Optimized content sections with responsive padding, typography, and spacing
1058
+
1059
+ ### Changed
1060
+
1061
+ - **Version Update**: Updated to version 1.9.19
1062
+ - **Stable Release**: Version 1.9.19 is the current stable version
1063
+ - **Meta Tag Update**: Replaced deprecated `apple-mobile-web-app-capable` with `mobile-web-app-capable`
1064
+ - **Code Cleanup**: Removed unnecessary comments from SCSS files for cleaner codebase
1065
+
1066
+ ### Installation
1067
+
1068
+ ```bash
1069
+ npm install ngxsmk-datepicker@1.9.19
1070
+ ```
1071
+
1072
+ ### Breaking Changes
1073
+
1074
+ None in v1.9.19.
1075
+
1076
+ ### Deprecations
1077
+
1078
+ None in v1.9.19.
1079
+
1080
+ ### Migration Steps
1081
+
1082
+ - This version maintains full backward compatibility with v1.9.18. All existing code will continue to work without modifications.
1083
+ - No code changes required.
1084
+ - Demo project layout improvements are automatic and require no code changes.
1085
+
1086
+ ## v1.9.17 → v1.9.18
1087
+
1088
+ ### Fixed
1089
+
1090
+ - **Mobile Touch Event Handling**: Improved touch listener attachment when calendar opens on mobile devices
1091
+ - Touch listeners now properly attach when calendar first opens, eliminating the need to navigate months first
1092
+ - Added retry mechanism with multiple attempts to ensure listeners are attached even on slower mobile devices
1093
+ - Improved timing with double `requestAnimationFrame` calls and multiple retry strategies
1094
+
1095
+ ### Changed
1096
+
1097
+ - **Version Update**: Updated to version 1.9.18
1098
+ - **Stable Release**: Version 1.9.18 is the current stable version
1099
+
1100
+ ### Installation
1101
+
1102
+ ```bash
1103
+ npm install ngxsmk-datepicker@1.9.18
1104
+ ```
1105
+
1106
+ ### Breaking Changes
1107
+
1108
+ None in v1.9.18.
1109
+
1110
+ ### Deprecations
1111
+
1112
+ None in v1.9.18.
1113
+
1114
+ ### Migration Steps
1115
+
1116
+ - This version maintains full backward compatibility with v1.9.17. All existing code will continue to work without modifications.
1117
+ - No code changes required.
1118
+
1119
+ ## v1.9.16 → v1.9.17
1120
+
1121
+ ### Changed
1122
+
1123
+ - **Version Update**: Updated to version 1.9.17
1124
+ - **Stable Release**: Version 1.9.17 is the current stable version
1125
+
1126
+ ### Migration Steps
1127
+
1128
+ No migration steps required. This is a patch version update. Simply update your package version:
1129
+
1130
+ ```bash
1131
+ npm install ngxsmk-datepicker@1.9.17
1132
+ ```
1133
+
1134
+ ### Breaking Changes
1135
+
1136
+ None in v1.9.17.
1137
+
1138
+ ### Deprecations
1139
+
1140
+ None in v1.9.17.
1141
+
1142
+ ### Notes
1143
+
1144
+ - This version maintains full backward compatibility with v1.9.16. All existing code will continue to work without modifications.
1145
+ - This is a patch version update with no code changes required.
1146
+
1147
+ ## v1.9.14 → v1.9.15
1148
+
1149
+ ### Fixed
1150
+
1151
+ - **Moment Object Binding with ngModel**: Fixed issue where Moment.js objects passed via `[(ngModel)]` were not binding correctly with the datepicker
1152
+ - Updated `writeValue()` method to normalize Moment.js objects before passing to `initializeValue()`
1153
+ - Ensures Moment.js objects (including those with `utcOffset()` applied) are properly converted to Date objects when binding with template-driven forms
1154
+ - Now correctly handles `moment(response.Date).utcOffset(timezone)` when setting via ngModel
1155
+ - **Date Clicks After Month Navigation**: Fixed issue where dates became unclickable after navigating backward or forward months
1156
+ - Updated `isDateDisabledMemo` getter to properly invalidate cached memoized function when month/year changes
1157
+ - Added month/year change detection to ensure disabled date cache is refreshed after navigation
1158
+ - Dates in previous/next months are now properly clickable without needing to close and reopen the datepicker
1159
+
1160
+ ### Changed
1161
+
1162
+ - **Version Update**: Updated to version 1.9.15
1163
+ - **Stable Release**: Version 1.9.15 is the current stable version
1164
+
1165
+ ### Migration Steps
1166
+
1167
+ No migration steps required. This is a patch version with bug fixes only. Simply update your package version:
1168
+
1169
+ ```bash
1170
+ npm install ngxsmk-datepicker@1.9.15
1171
+ ```
1172
+
1173
+ All fixes are backward compatible and require no code changes. This version is compatible with Angular 17 and up versions.
1174
+
1175
+ ## v1.9.13 → v1.9.14
1176
+
1177
+ ### Fixed
1178
+
1179
+ - **Date Picker Selection Issue**: Fixed issue where date picker was not working properly when selecting dates, especially in range mode
1180
+ - Added proper change detection scheduling when setting start date in range mode
1181
+ - Added memo cache invalidation to ensure UI updates correctly reflect selected dates
1182
+ - Fixed UI not updating when only start date is selected in range mode
1183
+ - **Moment.js Timezone Offset Preservation**: Fixed issue where Moment.js objects with timezone offsets (e.g., `moment().utcOffset('-0600')`) were not preserving the timezone offset when converted to Date objects
1184
+ - Added `momentToDate()` method that detects and preserves timezone offsets from Moment.js objects
1185
+ - Now correctly handles `moment().utcOffset('-0600')` without requiring `toDate()` which loses timezone information
1186
+
1187
+ ### Changed
1188
+
1189
+ - **Version Update**: Updated to version 1.9.14
1190
+ - **Stable Release**: Version 1.9.14 is the current stable version
1191
+
1192
+ ### Migration Steps
1193
+
1194
+ No migration steps required. This is a patch version with bug fixes only. Simply update your package version:
1195
+
1196
+ ```bash
1197
+ npm install ngxsmk-datepicker@1.9.14
1198
+ ```
1199
+
1200
+ All fixes are backward compatible and require no code changes.
1201
+
1202
+ ## v1.9.12 → v1.9.13
1203
+
1204
+ ### Fixed
1205
+
1206
+ - **valueChange Event Bug**: Fixed issue where `(valueChange)` event was emitting `null` instead of the date value for range mode when using template-driven forms with `[(ngModel)]`
1207
+ - **Range Mode Date Selection**: Fixed issue where dates became disabled/unclickable after navigating to previous or next months in range mode
1208
+ - **Moment.js Object Handling**: Fixed issue where Moment.js objects in range values and arrays were not being properly normalized and converted to Date objects
1209
+
1210
+ ### Changed
1211
+
1212
+ - **Version Update**: Updated to version 1.9.13
1213
+ - **Stable Release**: Version 1.9.13 is the current stable version
1214
+
1215
+ ### Migration Steps
1216
+
1217
+ No migration steps required. This is a patch version with bug fixes only. Simply update your package version:
1218
+
1219
+ ```bash
1220
+ npm install ngxsmk-datepicker@1.9.13
1221
+ ```
1222
+
1223
+ All fixes are backward compatible and require no code changes.
1224
+
1225
+ ## v1.9.11 → v1.9.12
1226
+
1227
+ ### Changed
1228
+
1229
+ - **Version Update**: Updated to version 1.9.12
1230
+ - **Stable Release**: Version 1.9.12 is the current stable version
1231
+
1232
+ ### Migration Steps
1233
+
1234
+ No code changes required. This is a minor version update with backward compatibility:
1235
+
1236
+ 1. Update package version:
1237
+
1238
+ ```bash
1239
+ npm install ngxsmk-datepicker@^1.9.12
1240
+ ```
1241
+
1242
+ 2. Rebuild your application:
1243
+
1244
+ ```bash
1245
+ npm run build
1246
+ ```
1247
+
1248
+ 3. Run tests to ensure everything works:
1249
+ ```bash
1250
+ npm test
1251
+ ```
1252
+
1253
+ **Note**: This version maintains full backward compatibility with v1.9.11. All existing code will continue to work without modifications.
1254
+
1255
+ ## v1.9.10 → v1.9.11
1256
+
1257
+ ### Fixed
1258
+
1259
+ - **Moment.js Integration**: Fixed critical issue where Moment.js objects with custom date formats would not populate correctly
1260
+ - Added support for Moment.js objects via `.toDate()` method
1261
+ - Enhanced format token parsing (YYYY, YY, MM, M, DD, D, hh, h, HH, H, mm, m, ss, s, a, A)
1262
+ - Improved TypeScript compatibility with dynamic object properties
1263
+
1264
+ ### Migration Steps
1265
+
1266
+ No code changes required. This is a bug fix release:
1267
+
1268
+ 1. Update package version:
1269
+
1270
+ ```bash
1271
+ npm install ngxsmk-datepicker@^1.9.11
1272
+ ```
1273
+
1274
+ 2. If you're using Moment.js with custom formats, the datepicker will now properly handle Moment.js objects.
1275
+
1276
+ ## v1.9.9 → v1.9.10
1277
+
1278
+ ### Fixed
1279
+
1280
+ - **Async Database Value Loading**: Enhanced datepicker to properly handle database values that load asynchronously
1281
+ - Added fallback sync mechanisms for async database loads
1282
+ - Extended sync duration to 30 seconds with 100ms check intervals
1283
+ - **TypeScript Compilation Error**: Fixed `EffectRef` type error when using Angular 17+ `effect()` API
1284
+ - **Test Configuration**: Fixed test configuration for Angular 17+ compatibility
1285
+
1286
+ ### Migration Steps
1287
+
1288
+ No code changes required. This is a bug fix release:
1289
+
1290
+ 1. Update package version:
1291
+
1292
+ ```bash
1293
+ npm install ngxsmk-datepicker@^1.9.10
1294
+ ```
1295
+
1296
+ 2. If you're experiencing issues with database values not populating, this version should resolve them.
1297
+
1298
+ ## v1.9.8 → v1.9.9
1299
+
1300
+ ### Fixed
1301
+
1302
+ - **Database Value Population**: Fixed critical issue where datepicker would not populate with values from database when using `[field]` input binding
1303
+ - Now properly handles Date objects, string dates, range objects, and arrays of dates
1304
+
1305
+ ### Migration Steps
1306
+
1307
+ No code changes required. This is a bug fix release:
1308
+
1309
+ 1. Update package version:
1310
+ ```bash
1311
+ npm install ngxsmk-datepicker@^1.9.9
1312
+ ```
1313
+
1314
+ ## v1.9.7 → v1.9.8
1315
+
1316
+ ### Fixed
1317
+
1318
+ - **Date Selection Reset Issue**: Fixed critical bug where selected dates would reset to today's date when using `[field]` input binding
1319
+ - Fixed date mutation issues
1320
+ - Added internal update flag to prevent value resets
1321
+
1322
+ ### Migration Steps
1323
+
1324
+ No code changes required. This is a bug fix release:
1325
+
1326
+ 1. Update package version:
1327
+ ```bash
1328
+ npm install ngxsmk-datepicker@^1.9.8
1329
+ ```
1330
+
1331
+ ## v1.9.6 → v1.9.7
1332
+
1333
+ ### Fixed
1334
+
1335
+ - **Calendar Population**: Fixed critical issue where datepicker calendar would not populate with dates when opened
1336
+ - Fixed issue when multiple datepickers were present in the same form
1337
+
1338
+ ### Migration Steps
1339
+
1340
+ No code changes required. This is a bug fix release:
1341
+
1342
+ 1. Update package version:
1343
+ ```bash
1344
+ npm install ngxsmk-datepicker@^1.9.7
1345
+ ```
1346
+
1347
+ ## v1.9.5 → v1.9.6
1348
+
1349
+ ### Fixed
1350
+
1351
+ - **Multiple Datepicker Management**: Fixed issue where multiple datepickers in the same form would open in the same centered location
1352
+ - **Outside Click Detection**: Improved click detection to properly close datepicker
1353
+ - **Auto-close Other Datepickers**: When opening a datepicker, all other open datepickers are now automatically closed
1354
+ - **Mobile Datepicker**: Fixed issues with mobile datepicker opening and closing
1355
+ - **Select Box Cursor**: Added pointer cursor to all select boxes
1356
+
1357
+ ### Migration Steps
1358
+
1359
+ No code changes required. This is a bug fix release:
1360
+
1361
+ 1. Update package version:
1362
+ ```bash
1363
+ npm install ngxsmk-datepicker@^1.9.6
1364
+ ```
1365
+
1366
+ ## v1.9.4 → v1.9.5
1367
+
1368
+ ### Fixed
1369
+
1370
+ - **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
1371
+ - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
1372
+ - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
1373
+ - Maintains backward compatibility with Angular 17-20
1374
+
1375
+ ### Migration Steps
1376
+
1377
+ No code changes required. This is a bug fix release:
1378
+
1379
+ 1. Update package version:
1380
+
1381
+ ```bash
1382
+ npm install ngxsmk-datepicker@^1.9.5
1383
+ ```
1384
+
1385
+ 2. If you were experiencing TypeScript errors with Signal Forms in Angular 21+, they should now be resolved.
1386
+
1387
+ ## v1.9.3 → v1.9.4
1388
+
1389
+ ### Added
1390
+
1391
+ - **Custom Date Format**: New `[displayFormat]` input property to display dates in custom formats
1392
+ - Supports format strings like "MM/DD/YYYY hh:mm A"
1393
+ - Works with date adapters (date-fns, dayjs, luxon) or built-in simple formatter
1394
+ - Supports common format tokens: YYYY, MM, DD, hh, mm, A, etc.
1395
+
1396
+ ### Fixed
1397
+
1398
+ - **Time Selection Dropdowns**: Fixed visibility issues with time selection dropdowns
1399
+ - Dropdowns now properly display and are not clipped by parent containers
1400
+ - Improved z-index handling for time selection dropdowns
1401
+
1402
+ ### Migration Steps
1403
+
1404
+ 1. Update package version:
1405
+
1406
+ ```bash
1407
+ npm install ngxsmk-datepicker@^1.9.4
1408
+ ```
1409
+
1410
+ 2. **Optional**: Use the new `[displayFormat]` input for custom date formatting:
1411
+ ```html
1412
+ <ngxsmk-datepicker [displayFormat]="'MM/DD/YYYY hh:mm A'" mode="single"> </ngxsmk-datepicker>
1413
+ ```
1414
+
1415
+ ## v1.9.2 → v1.9.3
1416
+
1417
+ ### Added
1418
+
1419
+ - **Time-Only Picker**: New `[timeOnly]` input property to display only time selection without calendar
1420
+ - Hides calendar grid and shows only time controls (hour, minute, AM/PM)
1421
+ - Automatically enables `showTime` when `timeOnly` is true
1422
+ - Perfect for time selection scenarios where date is not needed
1423
+
1424
+ ### Fixed
1425
+
1426
+ - **Test Suite**: Fixed 25+ failing tests across multiple test files
1427
+ - All 353 tests now pass successfully
1428
+
1429
+ ### Migration Steps
1430
+
1431
+ 1. Update package version:
1432
+
1433
+ ```bash
1434
+ npm install ngxsmk-datepicker@^1.9.3
1435
+ ```
1436
+
1437
+ 2. **Optional**: Use the new `[timeOnly]` input for time-only selection:
1438
+ ```html
1439
+ <ngxsmk-datepicker [timeOnly]="true" placeholder="Select Time"> </ngxsmk-datepicker>
1440
+ ```
1441
+
1442
+ ## v1.9.1 → v1.9.2
1443
+
1444
+ ### Changed
1445
+
1446
+ - **Bundle Optimization**: Optimized bundle size with improved TypeScript compiler settings
1447
+ - Main bundle: ~127KB (source maps excluded from published package)
1448
+ - Enhanced tree-shaking with optimized imports and compiler options
1449
+ - Source maps automatically removed from production builds
1450
+
1451
+ ### Fixed
1452
+
1453
+ - Test suite configuration improvements
1454
+ - Bundle analysis now correctly excludes source maps
1455
+ - Build warnings from conflicting export conditions resolved
1456
+
1457
+ ### Migration Steps
1458
+
1459
+ No code changes required. This is a transparent update with optimizations:
1460
+
1461
+ 1. Update package version:
1462
+
1463
+ ```bash
1464
+ npm install ngxsmk-datepicker@^1.9.2
1465
+ ```
1466
+
1467
+ 2. Rebuild your application to benefit from bundle optimizations:
1468
+ ```bash
1469
+ npm run build
1470
+ ```
1471
+
1472
+ ## v1.9.0 → v1.9.1
1473
+
1474
+ ### New Features
1475
+
1476
+ _No new features in v1.9.1._
1477
+
1478
+ ### Changes
1479
+
1480
+ #### Bundle Optimization
1481
+
1482
+ The library bundle has been further optimized for production:
1483
+
1484
+ - **Bundle Size**: Main bundle is now ~127KB (source maps excluded from published package)
1485
+ - **TypeScript Compiler**: Enhanced settings for better tree-shaking
1486
+ - Added `importsNotUsedAsValues: "remove"` for smaller output
1487
+ - Disabled `preserveConstEnums` for better inlining
1488
+ - **Source Maps**: Automatically removed from production builds (saves ~127KB)
1489
+ - **Package Configuration**: Fixed exports to eliminate build warnings
1490
+
1491
+ **For Developers:**
1492
+
1493
+ - Use `npm run build:optimized` for production builds
1494
+ - Use `npm run build:analyze` to check bundle size
1495
+ - Source maps are automatically excluded from the published package
1496
+
1497
+ #### Build Process Improvements
1498
+
1499
+ - Source maps are now automatically removed from production builds
1500
+ - Improved build scripts with better error handling
1501
+ - Enhanced bundle analysis that correctly excludes source maps
1502
+
1503
+ #### Package Configuration
1504
+
1505
+ - Fixed `package.json` exports to eliminate build warnings
1506
+ - Optimized `files` array to exclude unnecessary files
1507
+ - Updated exports field for better module resolution
1508
+
1509
+ #### Test Configuration
1510
+
1511
+ - Added Zone.js polyfills to library test configuration
1512
+ - Updated test commands to explicitly target library project
1513
+ - Improved test reliability across Angular versions
1514
+
1515
+ ### Breaking Changes
1516
+
1517
+ None in v1.9.1.
1518
+
1519
+ ### Deprecations
1520
+
1521
+ None in v1.9.1.
1522
+
1523
+ ### Migration Steps
1524
+
1525
+ No code changes required. This is a transparent update with optimizations and bug fixes:
1526
+
1527
+ 1. Update package version:
1528
+
1529
+ ```bash
1530
+ npm install ngxsmk-datepicker@^1.9.1
1531
+ ```
1532
+
1533
+ 2. Rebuild your application:
1534
+
1535
+ ```bash
1536
+ npm run build
1537
+ ```
1538
+
1539
+ 3. Verify bundle size improvements (optional):
1540
+ - Check your application's bundle size
1541
+ - You should see improved tree-shaking benefits
1542
+
1543
+ 4. Run tests to ensure everything works:
1544
+ ```bash
1545
+ npm test
1546
+ ```
1547
+
1548
+ **Note**: If you're a library developer using ngxsmk-datepicker as a dependency, you may notice:
1549
+
1550
+ - Smaller bundle sizes in your application
1551
+ - Fewer build warnings related to package exports
1552
+ - Improved test reliability if you're running tests with Zone.js
1553
+
1554
+ ## v1.8.0 → v1.9.0
1555
+
1556
+ ### New Features
1557
+
1558
+ #### Extension Points & Hooks
1559
+
1560
+ Added comprehensive hook system for customization.
1561
+
1562
+ **New Input:**
1563
+
1564
+ ```typescript
1565
+ hooks: DatepickerHooks | null = null;
1566
+ ```
1567
+
1568
+ **Usage:**
1569
+
1570
+ ```typescript
1571
+ const myHooks: DatepickerHooks = {
1572
+ getDayCellClasses: (date, isSelected, isDisabled, isToday, isHoliday) => {
1573
+ return isHoliday ? ["custom-holiday"] : [];
1574
+ },
1575
+ validateDate: (date, currentValue, mode) => {
1576
+ return date.getDay() !== 0; // Disable Sundays
1577
+ },
1578
+ };
1579
+ ```
1580
+
1581
+ ```html
1582
+ <ngxsmk-datepicker [hooks]="myHooks"></ngxsmk-datepicker>
1583
+ ```
1584
+
1585
+ #### Enhanced Keyboard Shortcuts
1586
+
1587
+ New keyboard shortcuts:
1588
+
1589
+ - `Y`: Select yesterday
1590
+ - `N`: Select tomorrow
1591
+ - `W`: Select next week
1592
+
1593
+ #### Animation Optimizations
1594
+
1595
+ All animations now use GPU acceleration for better performance. No code changes required.
1596
+
1597
+ #### Bundle Optimization
1598
+
1599
+ The library bundle has been optimized for production:
1600
+
1601
+ - **Bundle Size**: Main bundle is now ~127KB (source maps excluded from published package)
1602
+ - **Tree-Shaking**: Enhanced with optimized TypeScript compiler settings
1603
+ - **Source Maps**: Automatically removed from production builds (saves ~127KB)
1604
+ - **No Breaking Changes**: All optimizations are transparent to end users
1605
+
1606
+ **For Developers:**
1607
+
1608
+ - Use `npm run build:optimized` for production builds
1609
+ - Use `npm run build:analyze` to check bundle size
1610
+ - Source maps are automatically excluded from the published package
1611
+
1612
+ ### Breaking Changes
1613
+
1614
+ None in v1.9.0.
1615
+
1616
+ ### Deprecations
1617
+
1618
+ None in v1.9.0.
1619
+
1620
+ ## v1.7.0 → v1.8.0
1621
+
1622
+ ### New Features
1623
+
1624
+ #### Signal Forms Support
1625
+
1626
+ Added `[field]` input for Angular 21+ Signal Forms integration.
1627
+
1628
+ **Before:**
1629
+
1630
+ ```typescript
1631
+ // Using Reactive Forms
1632
+ dateControl = new FormControl<DatepickerValue>(null);
1633
+ ```
1634
+
1635
+ ```html
1636
+ <ngxsmk-datepicker formControlName="date"></ngxsmk-datepicker>
1637
+ ```
1638
+
1639
+ **After (Optional - Reactive Forms still work):**
1640
+
1641
+ ```typescript
1642
+ // Using Signal Forms
1643
+ localObject = signal({ date: null as DatepickerValue });
1644
+ myForm = form(
1645
+ this.localObject,
1646
+ objectSchema({
1647
+ date: objectSchema<DatepickerValue>(),
1648
+ }),
1649
+ );
1650
+ ```
1651
+
1652
+ ```html
1653
+ <ngxsmk-datepicker [field]="myForm.date"></ngxsmk-datepicker>
1654
+ ```
1655
+
1656
+ #### SSR Optimizations
1657
+
1658
+ The datepicker is now fully SSR-compatible. No code changes required, but ensure you're using the latest version for SSR applications.
1659
+
1660
+ #### Improved Value Input
1661
+
1662
+ The `[value]` input now initializes immediately when set programmatically.
1663
+
1664
+ **Before:**
1665
+
1666
+ ```typescript
1667
+ // Value might not initialize immediately
1668
+ component.value = new Date();
1669
+ ```
1670
+
1671
+ **After:**
1672
+
1673
+ ```typescript
1674
+ // Value initializes immediately
1675
+ component.value = new Date();
1676
+ ```
1677
+
1678
+ ### Breaking Changes
1679
+
1680
+ None in v1.8.0.
1681
+
1682
+ ### Deprecations
1683
+
1684
+ None in v1.8.0.
1685
+
1686
+ ## v1.9.0 → v2.0.0
1687
+
1688
+ ### Planned Breaking Changes
1689
+
1690
+ _This section will be updated when v2.0.0 is released._
1691
+
1692
+ ### Migration Steps
1693
+
1694
+ 1. Update package version:
1695
+
1696
+ ```bash
1697
+ npm install ngxsmk-datepicker@^2.0.0
1698
+ ```
1699
+
1700
+ 2. Review breaking changes below
1701
+ 3. Update your code according to migration steps
1702
+ 4. Run tests
1703
+ 5. Update any custom styles if CSS classes changed
1704
+
1705
+ ## General Migration Tips
1706
+
1707
+ ### 1. Read the Changelog
1708
+
1709
+ Always check `CHANGELOG.md` for detailed changes in each version.
1710
+
1711
+ ### 2. Test Thoroughly
1712
+
1713
+ After upgrading:
1714
+
1715
+ - Test all datepicker instances in your app
1716
+ - Verify form integration still works
1717
+ - Check SSR compatibility if applicable
1718
+ - Test keyboard navigation
1719
+ - Verify accessibility features
1720
+
1721
+ ### 3. Update Dependencies
1722
+
1723
+ Ensure your Angular version is compatible:
1724
+
1725
+ - Check the compatibility table in README.md
1726
+ - Update Angular if needed
1727
+
1728
+ ### 4. Check TypeScript Errors
1729
+
1730
+ New versions may have stricter types:
1731
+
1732
+ ```bash
1733
+ npm run build
1734
+ # Fix any TypeScript errors
1735
+ ```
1736
+
1737
+ ### 5. Review CSS Changes
1738
+
1739
+ If you've customized styles:
1740
+
1741
+ - Check if CSS class names changed
1742
+ - Review CSS custom properties
1743
+ - Update selectors if needed
1744
+
1745
+ ## Getting Help
1746
+
1747
+ If you encounter issues during migration:
1748
+
1749
+ 1. Check existing GitHub issues
1750
+ 2. Review the documentation
1751
+ 3. Open a new issue with:
1752
+ - Your current version
1753
+ - Target version
1754
+ - Error messages
1755
+ - Code examples
1756
+
1757
+ ## Version Compatibility
1758
+
1759
+ | ngxsmk-datepicker | Angular | Node.js |
1760
+ | ----------------- | ------- | ------- |
1761
+ | 1.9.17+ | 17-22 | 18+ |
1762
+ | 1.9.16 | 17-22 | 18+ |
1763
+ | 1.9.15 | 17-22 | 18+ |
1764
+ | 1.9.14 | 17-22 | 18+ |
1765
+ | 1.9.11 | 17-22 | 18+ |
1766
+ | 1.9.10 | 17-22 | 18+ |
1767
+ | 1.9.9 | 17-22 | 18+ |
1768
+ | 1.9.8 | 17-22 | 18+ |
1769
+ | 1.9.7 | 17-22 | 18+ |
1770
+ | 1.9.6 | 17-22 | 18+ |
1771
+ | 1.9.5 | 17-22 | 18+ |
1772
+ | 1.9.4 | 17-22 | 18+ |
1773
+ | 1.9.3 | 17-22 | 18+ |
1774
+ | 1.9.2 | 17-22 | 18+ |
1775
+ | 1.9.1 | 17-22 | 18+ |
1776
+ | 1.9.0 | 17-22 | 18+ |
1777
+ | 1.8.0 | 17-22 | 18+ |
1778
+ | 1.7.0 | 17-20 | 18+ |
1779
+
1780
+ ## Deprecation Timeline
1781
+
1782
+ When APIs are deprecated:
1783
+
1784
+ 1. **Deprecation Notice**: API marked with `@deprecated` JSDoc
1785
+ 2. **Warning Period**: Deprecated API remains functional for at least one major version
1786
+ 3. **Removal**: Deprecated API removed in next major version
1787
+
1788
+ Example:
1789
+
1790
+ - v1.8.0: API deprecated
1791
+ - v1.9.0: Still works with deprecation warning
1792
+ - v1.9.1: Still works with deprecation warning
1793
+ - v2.0.0: Removed
1794
+