ngxsmk-datepicker 2.4.0-beta.0 → 3.0.1-beta.0

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