ngxsmk-datepicker 2.2.12 → 2.2.13

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/CHANGELOG.md ADDED
@@ -0,0 +1,1218 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ **Last updated:** May 6, 2026 - **Current stable:** v2.2.13
6
+
7
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
+
10
+ ## [Unreleased]`r`n`r`n## [2.2.13] - 2026-05-06`r`n`r`n### Fixed`r`n`r`n- **npm package**: Republished with complete build artifacts (`fesm2022/`, `types/`) and release safeguards to prevent docs-only tarballs.`r`n
11
+
12
+ ### Added
13
+
14
+ - **Documentation**: Added [IMPROVEMENT_REPORT.md](IMPROVEMENT_REPORT.md) as the maintained anchor index for roadmap-linked improvements; added [FEATURE_SCOPING.md](projects/ngxsmk-datepicker/docs/FEATURE_SCOPING.md) and [REFACTOR_PLAN.md](projects/ngxsmk-datepicker/docs/REFACTOR_PLAN.md).
15
+ - **Demo**: Playground **Advanced** controls (`syncScroll`, `appendToBody`, `disabledState`, `mobileModalStyle`) and stable `id`s for E2E.
16
+ - **E2E**: [e2e/playground.spec.ts](e2e/playground.spec.ts) — RTL, multi-calendar inline, range quick picks; smoke tests target `.ngxsmk-popover-open` so inline `role="dialog"` calendars on `/examples` do not break strict locators.
17
+ - **Storybook**: `MultiCalendarInline` and `RangeWithQuickPicks` stories.
18
+ - **Examples**: [examples/ionic-test-app/README.md](examples/ionic-test-app/README.md) install and matrix notes.
19
+ - **Compatibility**: CI / peer validation checklist in [COMPATIBILITY.md](projects/ngxsmk-datepicker/docs/COMPATIBILITY.md).
20
+
21
+ ### Changed
22
+
23
+ - **Documentation**: Refreshed Markdown files across the repository with updated metadata headers (last updated/current stable), aligned compatibility wording, and contact links.
24
+ - **Roadmap**: Updated main-component line count reference; roadmap links now resolve to `IMPROVEMENT_REPORT.md`.
25
+ - **Compatibility Docs**: Clarified Vitest wording to describe compatibility without implying a default test runner requirement.
26
+ - **i18n (demo)**: New playground strings for the Advanced section (all demo-app languages).
27
+
28
+ ## [2.2.12] - 2026-05-02 [BROKEN - NPM PACKAGE]
29
+
30
+ ### Fixed
31
+
32
+ - **npm package**: The `2.2.12` tarball on the registry omitted `fesm2022/` and `types/` (only docs, styles, and package metadata). **Use `ngxsmk-datepicker@2.2.11` until `2.2.13` or later** with a full ng-packagr build ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
33
+
34
+ ## [2.2.11] - 2026-03-24
35
+
36
+ ### Fixed
37
+
38
+ - **Documentation**: Reduced `README.md` size to comply with npm registry metadata limits (64KB), ensuring it displays correctly on the package page.
39
+ - **Package Config**: Fixed `exports` in `package.json` to properly expose `styles/` and `types/`. This resolves "Could not resolve ngxsmk-datepicker/styles/ionic-integration.css" errors in consuming apps.
40
+
41
+ ## [2.2.10] - 2026-03-24 [BROKEN - README ISSUE]
42
+
43
+ ### Fixed
44
+ - Includes all fixes from v2.2.9.
45
+
46
+ ## [2.2.9] - 2026-03-24 [BROKEN - PUBLISHING ISSUE]
47
+
48
+ ### Fixed
49
+
50
+ - **Date Formatting**: Resolved "off-by-one" day of week shift and recursive token replacement corruption in `dateFormatPattern` logic.
51
+ - **Build**: Resolved TypeScript type mismatch in `CustomDateFormatService` that prevented production builds.
52
+
53
+ ## [2.2.8] - 2026-03-21
54
+
55
+ ### Fixed
56
+
57
+ - **npm package**: Republished with a complete ng-packagr build. Tarballs for **2.2.3–2.2.7** on the registry were missing `fesm2022/` and `types/` (published from source without build output). **Use `ngxsmk-datepicker@2.2.8` instead of 2.2.7** for installs from npm. A `prepublishOnly` check now blocks publishing without those artifacts ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
58
+
59
+ ## [2.2.7] - 2026-03-21
60
+
61
+ ### Fixed
62
+
63
+ - **npm package**: Release workflow builds the library before publish so tarballs include `fesm2022/` and type declarations ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
64
+
65
+ ### Added
66
+
67
+ - **Range mode**: `allowSameDay` input for single-day ranges (same date twice or close popover with only a start date) ([#231](https://github.com/NGXSMK/ngxsmk-datepicker/issues/231)).
68
+
69
+ ## [2.2.6] - 2026-03-10
70
+
71
+ ### Fixed
72
+ - **Type Safety**: Fixed casing of `DatepickerValue` type export to ensure consistency across the library and consuming applications.
73
+ - **Module Resolution**: Improved TypeScript module resolution for local library development.
74
+ - **Date Modal**: Fixed null pointer exception in `getSelectedDates` when handling partial date ranges.
75
+
76
+ ## [2.2.4] - 2026-03-10
77
+
78
+ ### Fixed
79
+ - **Timezone Support**: Added full support for IANA timezones in "Today" calculation. The component now correctly identifies "Today" based on the configured `timezone` input.
80
+ - **Date Validation**: Fixed an issue where "Today" was incorrectly considered invalid if `minDate` was set to the current time. Validation now normalizes to the start of the day.
81
+ - **Keyboard Shortcuts**: Updated "Today" selection shortcut to be timezone-aware.
82
+
83
+ ## [2.2.3] - 2026-03-09
84
+
85
+ ### Fixed
86
+ - **Linting**: Resolved SonarLint cognitive complexity and nesting depth issues in Material support integration.
87
+ - **Coverage**: Increased function test coverage to ~68.2% to meet project thresholds.
88
+ - **Stability**: Fixed regression in touch event handling and Material Form Field integration.
89
+ - **Maintenance**: Marked static registry as readonly and removed redundant helper methods.
90
+
91
+ ## [2.2.1] - 2026-03-03
92
+
93
+ - **Version**: Bump to 2.2.1.
94
+
95
+ ## [2.2.0] - 2026-02-25
96
+
97
+ - **Enhanced Visibility**: Fixed text contrast in dropdown options for better accessibility, ensuring high-contrast labels for month and year selections.
98
+ - **Web Component Support**: Added capability to export the library as a standard Custom Web Component using Angular Elements, enabling full support for React, Vue, Svelte, and Vanilla JS.
99
+ - **Example Applications**: Added React, Vue, and Vanilla JS implementation examples in the `/examples` directory.
100
+
101
+ ### Fixed
102
+
103
+ - **TypeScript Strictness Overhaul**: Comprehensive rewrite of library component typing to eliminate all `any` types. Ensure full compatibility with `exactOptionalPropertyTypes` strict configurations.
104
+ - Corrected `classes` input type from `Record<string, unknown>` to the concrete `DatepickerClasses` interface explicitly allowing `| undefined = undefined` to support strict assignments.
105
+ - Applied specific types everywhere (`Date[]` for timelineMonths, `{label, value: boolean}[]` for ampmOptions, explicit Event and TouchEvent payloads).
106
+ - Adjusted Angular pseudo-event `keydown.enter` handlers expecting `KeyboardEvent` to use the base `Event` type for robust type safety.
107
+ - **appendToBody positioning (Issue #206)**: When `appendToBody` is enabled, the calendar popover now positions correctly next to the input. The popover uses viewport coordinates and `position: fixed` so it is no longer misplaced on scrolled pages. Inline styles are applied with `!important` so desktop CSS rules do not override the computed position.
108
+ - **Datepicker in modal**: When the datepicker is used inside a modal (or any dialog), the popover no longer flashes in the wrong place on first open. The popover is hidden until positioned and then revealed; modal detection auto-enables `appendToBody`. Demo app Integrations page includes a "Datepicker in a modal" example with `[appendToBody]="true"`.
109
+ - **Popover width**: The calendar popover now matches the input width (with a minimum of 280px) when positioning is applied, so the dropdown aligns visually with the trigger.
110
+
111
+ ### Changed
112
+
113
+ - **Header Select Synchronization**: Migrated `CustomSelectComponent` and `CalendarHeaderComponent` to `ViewEncapsulation.None`. Consolidated all dropdown styles into `_header.scss` to enable seamless global layout control.
114
+ - **Improved Dropdown Layout**: Implemented a flexbox-based `justify-content: space-between` layout for Month/Year selectors, ensuring a professional, edge-to-edge gap between text and icons on mobile screens.
115
+ - **UI Refinement**: Unified container border radii to 12px for visual consistency, removed unnecessary borders from the popover container, and significantly reduced paddings/margins in the header, calendar grid, and footer for a tighter, more modern look.
116
+ - **Performance Optimization**: Further reduced internal calendar opening timers for faster user feedback—Mobile delay reduced from 280ms to 150ms, and Desktop delay reduced to 60ms.
117
+ - **Loading time**: Reduced opening/loading delays so the calendar appears sooner—desktop ~80–120ms (was 200–350ms), mobile ~280ms (was 800ms). Click path delay before positioning/reveal reduced from 100ms to 50ms.
118
+ - **CSS & Linting (SonarLint)**: Resolved duplicate selectors, commented-out code, duplicate properties in `datepicker.css` for cleaner styles, and resolved all 38 remaining TypeScript library lint warnings.
119
+
120
+
121
+ ## [2.1.7] - 2026-02-23
122
+
123
+ ### Added
124
+
125
+ - **Google Calendar Integration**: Added full built-in support for syncing and displaying events from Google Calendar.
126
+ - New input `enableGoogleCalendar` (boolean) to toggle the feature directly from the template.
127
+ - New input `googleClientId` (string) to configure the Google OAuth Client ID.
128
+ - New `GoogleCalendarService` responsible for GIS library loading and seamless authentication syncing.
129
+ - Displays authenticated status natively within the calendar header popup.
130
+ - Emits `googleSyncClick` for tracking user interactions.
131
+
132
+ ### Fixed
133
+
134
+ - **DatePipe Provider Issue**: Fixed `NG0201: No provider found for _DatePipe` error (Issue #193). Decoupled `DatepickerParsingService` from the root injector to ensure it correctly resolves `DatePipe` within the component context. Users no longer need to manually provide `DatePipe` in their application configuration.
135
+
136
+ ## [2.1.6] - 2026-02-17
137
+
138
+ ### Changed
139
+
140
+ - **Version**: Bump to 2.1.6 (current stable release).
141
+
142
+ ## [2.1.5] - 2026-02-17
143
+
144
+ ### Added
145
+
146
+ - **Validation messages (i18n)**: New user-facing validation strings in `DatepickerTranslations`—`invalidDateFormat`, `dateBeforeMin`, `dateAfterMax`, `invalidDate`—with full translation support across all 8 languages. The component shows a translated error message when input is invalid, before min, or after max, and emits `validationError` with `code` and `message`.
147
+ - **Calendar loading state**: Visual loading state (spinner + text) while the calendar is opening or generating. Loading state is announced to screen readers via `AriaLiveService`. A public getter is available for templates to reflect "calendar is loading."
148
+ - **Installation options**: New `docs/INSTALLATION.md` documenting all install methods (npm, Yarn, pnpm, Bun, Git, local path, CDN, tarball). Demo Installation page updated with alternative install commands and a link to the full guide.
149
+ - **Issue-reproduction app**: New minimal Angular app `angular-issue-test` (routes: Home, month-navigation, range-reselection) for manually verifying reported issues. Served via `npx ng serve angular-issue-test`.
150
+
151
+ ### Changed
152
+
153
+ - **Version**: Bump to 2.1.5 (stable release).
154
+ - **Demo app – light/dark theme**: Theme toggle now correctly switches the UI. `data-theme` is synced on the document when theme changes; `html[data-theme='light']` CSS overrides added for the light palette. Nav-link hover uses `var(--color-text-main)` for both themes. Responsive spacing variables use `clamp()`.
155
+ - **Library refactors**: Calendar grid generation and input parsing/formatting logic extracted into `CalendarGenerationService` and `DatepickerParsingService` respectively.
156
+ - **Demo styles**: New utility classes (e.g. `.link`, `.no-underline`, `.text-dim`, `.gap-xs`) and tip label layout tweak.
157
+ - **Docs**: README and library README reference `docs/INSTALLATION.md`. CHANGELOG, MIGRATION, ROADMAP, SECURITY, API_REFERENCE, BUNDLE_SIZE_REPORT, and API.md updated for 2.1.5.
158
+
159
+ ### Fixed
160
+
161
+ - **Demo theme**: Fixed light/dark theme toggle not applying—demo now correctly reflects the active theme (header toggle and system preference).
162
+
163
+ ## [2.1.4] - 2026-02-13
164
+
165
+ ### Added
166
+
167
+ - **Playground Enhancements**: Added new configuration options for `minDate`, `maxDate`, and `weekStart` to the interactive playground, allowing users to test boundary constraints and locale overrides.
168
+ - **Improved Internationalization**: Added full translation support for new playground features across all 8 supported languages (English, German, Spanish, Swedish, Korean, Chinese, Japanese, and French).
169
+
170
+ ### Fixed
171
+
172
+ - **Calendar Grid Consistency**: Ensured the calendar always generates a full 42-day (6-week) grid. This prevents layout shifts and provides a more stable UI when navigating between months with different numbers of days.
173
+ - **Locale-Specific Week Starts**: Fixed issues with manual `weekStart` overrides and locale-dependent first day of week calculations, ensuring accurate calendar generation across diverse cultural settings.
174
+
175
+ ## [2.1.3] - 2026-02-11
176
+
177
+ ### Fixed
178
+
179
+ - **Inline Datepicker Width**: Fixed an issue where the inline datepicker was constrained by container styles in some contexts, causing it to appear cramped or cut off. The inline mode now correctly fits its content.
180
+
181
+ ## [2.1.2] - 2026-02-11
182
+
183
+ ### Fixed
184
+
185
+ - **Mobile Experience**: Improved stability on mobile devices (specifically Samsung/Android/Edge).
186
+ - Fixed an issue where the calendar would close prematurely during interactions due to portaling logic.
187
+ - Added "ghost click" protection to the backdrop to prevent accidental closure right after opening.
188
+ - Standardized containment checks to handle popovers appended to the document body.
189
+ - **Circular Dependency**: Resolved `RuntimeError: NG0200: Circular dependency detected` when using `NgModel` or Reactive Forms.
190
+ - Removed `NG_VALUE_ACCESSOR` from component providers to break the circular link with `NgControl`.
191
+ - Implemented manual `valueAccessor` assignment in the constructor for safe interaction with Angular's form system.
192
+ - **Dependency Cleanup**: Removed unused `forwardRef` and `NG_VALUE_ACCESSOR` imports to improve bundle size and build performance.
193
+
194
+ ### Changed
195
+
196
+ - **UI Refinement (Premium Aesthetic)**: Improved the overall visual appearance with a "border detox."
197
+ - Reduced border thickness from 1.5px to 1px library-wide.
198
+ - Softened border colors and added subtle ghost backgrounds for interactive elements.
199
+ - Enhanced navigation buttons with a borderless-by-default look.
200
+
201
+ ### Removed
202
+
203
+ - **Range Duration Header**: Removed the "X Days" duration header from range selection mode to reduce visual clutter and simplify the UI.
204
+
205
+
206
+ ## [2.1.1] - 2026-02-09
207
+
208
+ ### Fixed
209
+
210
+ - **Material Form Field Integration**: Improved `NgxsmkDatepickerComponent` to correctly notify `mat-form-field` of state changes.
211
+ - Injected `NgControl` into the component to properly integrate with Angular's form system.
212
+ - Added `stateChanges.next()` call in `emitValue` to ensure the form field reflects internal state changes (e.g., when selecting a date).
213
+ - **Helper Function Enhancements**: Updated `provideMaterialFormFieldControl` with runtime warnings for missing or incorrect Material tokens.
214
+
215
+ ## [2.1.0] - 2026-02-05
216
+
217
+
218
+ ### Fixed
219
+
220
+ - **Package Configuration**: Corrected TypeScript declaration paths in package.json
221
+ - Updated `types` and `typings` fields to point to `types/ngxsmk-datepicker.d.ts` instead of non-existent `index.d.ts`
222
+ - Simplified `exports` field to match v2.0.9 format, removing unnecessary module export configurations
223
+ - Removed disallowed `esm2022` property from package.json
224
+ - Ensures proper TypeScript module resolution in consuming applications
225
+
226
+ ### Changed
227
+
228
+ - **Package Distribution**: Streamlined package exports configuration for better compatibility
229
+ - Aligned exports structure with stable v2.0.9 format
230
+ - Removed redundant module resolution entries for cleaner package.json
231
+
232
+ ### Important Notice
233
+
234
+ ⚠️ **Versions 2.0.10 and 2.0.11 have been unpublished from npm** due to critical package configuration issues that prevented proper TypeScript module resolution. All users should upgrade to v2.1.1 or later.
235
+
236
+ ## [2.0.11] - 2026-02-05 [BROKEN - UNPUBLISHED]
237
+
238
+ **⚠️ This version has been unpublished from npm due to incorrect package configuration. Use v2.1.1 instead.**
239
+
240
+ ### Fixed
241
+
242
+ - **TypeScript Type Declarations**: Attempted to fix "Could not find a declaration file for module 'ngxsmk-datepicker'" error
243
+ - Added proper `exports` field in package.json with correct type declaration path
244
+ - Configured exports to point to `index.d.ts` for TypeScript module resolution
245
+ - **Note**: This fix was incomplete and the version has been replaced by v2.1.1
246
+
247
+ ## [2.0.10] - 2026-02-05 [BROKEN - UNPUBLISHED]
248
+
249
+ **⚠️ This version has been unpublished from npm due to incorrect package configuration. Use v2.1.1 instead.**
250
+
251
+ ### Fixed
252
+
253
+ - **Infinite Recursion in Date Utilities**: Fixed `RangeError: Maximum call stack size exceeded` in `getEndOfDay()` function
254
+ - Refactored recursive logic to use direct date manipulation
255
+ - Replaced recursive `addMonths` calls with iterative approach
256
+ - Improves performance and eliminates stack overflow risk
257
+ - **Timezone Test Edge Cases**: Fixed date component preservation in timezone conversion tests
258
+ - Updated timezone tests to use `Date.UTC()` for consistent cross-environment behavior
259
+ - Ensures test reliability across different system timezones with non-integer offsets (UTC+5:30, etc.)
260
+
261
+ ### Optimized
262
+
263
+ - **Build and Release**: Removed unnecessary generated files from distribution
264
+ - Cleaned up coverage reports and build artifacts
265
+ - Streamlined demo app output
266
+
267
+ ## [2.0.9] - 2026-01-31
268
+
269
+ ### Optimized
270
+
271
+ - **Stylesheet Architecture**: Comprehensive optimization of CSS assets
272
+ - Replaced redundant mobile stylesheets with a unified "Responsive Overrides" system
273
+ - Removed deprecated keyframes and duplicate selectors
274
+ - Enhanced commenting standards with industrial/professional documentation style
275
+ - Reduced CSS bundle size by eliminating unused styles
276
+
277
+ ### Fixed
278
+
279
+ - **Sticky Header Overlap**: Resolved critical z-index stacking issue where sticky headers would overlap the datepicker popup
280
+ - Implemented aggressive z-index boost (`2147483647`) for the host component when active
281
+ - Ensures datepicker always floats above application navigation bars and modal backdrops
282
+ - **Mobile Dropup Positioning**: Fixed footer clipping issues on mobile devices
283
+ - Time selection dropdowns now intelligently open upwards ("dropup") on screens < 992px
284
+ - Prevents dropdown options from being cut off by the bottom of the viewport or sticky footers
285
+ - Improved touch interactions for time selection on mobile
286
+
287
+ ## [2.0.8] - 2026-01-31
288
+
289
+ ### Added
290
+
291
+ - **Ionic Integration**: Added automatic support for Ionic CSS variables
292
+ - Datepicker now automatically inherits Ionic app theme colors (primary, background, text)
293
+ - No additional configuration required for native look and feel in Ionic apps
294
+ - Documented integration steps in README
295
+
296
+ ### Optimized
297
+
298
+ - **Change Detection**: Optimized internal change detection strategy
299
+ - Removed redundant `ChangeDetectorRef` calls in favor of Signal-based updates
300
+ - Improved compatibility with Zoneless Angular applications
301
+ - Cleaner and more efficient state management
302
+
303
+ ### Fixed
304
+
305
+ - **Mobile Page Jump**: Fixed issue where selecting a date would cause the page to jump to the top on some mobile browsers (Firefox Android)
306
+ - Added `{ preventScroll: true }` to focus restoration logic
307
+ - **Dropdown Scrolling**: Fixed UX issue in month/year dropdowns
308
+ - Dropdowns now automatically scroll to the currently selected option when opened
309
+ - Improved mobile scrolling behavior within dropdowns by removing conflicting close logic
310
+
311
+ ### Changed
312
+
313
+ - **Version Update**: Updated to version 2.0.8
314
+
315
+ ## [2.0.7] - 2026-01-26
316
+
317
+ - **Version Update**: Updated to version 2.0.7
318
+
319
+ ## [2.0.6] - 2026-01-15
320
+
321
+ ### Enhanced
322
+
323
+ - **Range Picker Reselection**: Improved comprehensive range reselection behavior
324
+ - Clicking the start date when a complete range is selected now clears only the end date
325
+ - 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
326
+ - **NEW**: Clicking any date within the selected range now clears the end date and sets the clicked date as the new start date
327
+ - Allows users to easily redefine date ranges from any point (start, end, or within the range)
328
+ - Example scenarios:
329
+ - Range: Jan 10 - Jan 20, Click Jan 10 → Result: Jan 10 (can select new end)
330
+ - Range: Jan 10 - Jan 20, Click Jan 20 → Result: Jan 20 (can select new end)
331
+ - Range: Jan 26 - Jan 30, Click Jan 27 → Result: Jan 27 (can select new end)
332
+ - Improves usability by providing intuitive range adjustment from any direction
333
+
334
+ ### Changed
335
+
336
+ - **Code Cleanup**: Removed unnecessary inline comments from range selection logic for cleaner, more maintainable code
337
+ - **Version Update**: Updated to version 2.0.6
338
+
339
+ ## [2.0.5] - 2026-01-15
340
+
341
+ ### Enhanced
342
+
343
+ - **Range Picker Reselection**: Improved user experience when reselecting date ranges
344
+ - Clicking the start date again after selecting a complete range now clears only the end date
345
+ - Allows users to easily redefine the end date without clearing the entire selection
346
+ - The start date remains selected, and users can immediately choose a new end date
347
+ - Example: After selecting Jan 19 (start) → Jan 21 (end), clicking Jan 19 again keeps Jan 19 selected and clears Jan 21
348
+ - Improves usability by reducing clicks needed to adjust date ranges
349
+
350
+ ### Fixed
351
+
352
+ - **Range Mode Value Emission**: Fixed issue where clicking the start date again after a complete range was selected would update the visual state but not emit the value change
353
+ - The datepicker now properly emits a partial range value (`{ start: Date, end: null }`) when the end date is cleared
354
+ - Parent components and form bindings now correctly reflect the cleared end date state
355
+ - Resolves inconsistency between visual calendar state and bound values
356
+
357
+ ### Patch Changes
358
+
359
+ - **Version Update**: Updated to version 2.0.5
360
+ - **Documentation**: Added comprehensive "Form Validation" section to README to explain `readonly` input behavior and provide solutions for native browser validation (e.g., using `allowTyping="true"`).
361
+
362
+ ## [2.0.4] - 2026-01-14
363
+
364
+ ### Patch Changes
365
+
366
+ - **Version Update**: Updated to version 2.0.4
367
+ - **Validation Fix**: Fixed issue where `[field]` validation messages were not triggering because the `touched` state was not being synced to the field. Added `markAsTouched` support to `FieldSyncService` and updated `NgxsmkDatepickerComponent` to mark the field as touched on blur and value selection.
368
+
369
+ ## [2.0.3] - 2026-01-14
370
+
371
+ ### Patch Changes
372
+
373
+ - **Version Update**: Updated to version 2.0.3
374
+ - **Code Cleanup**: Removed unnecessary comments from `field-sync.service.ts` to improve code readability and maintainability.
375
+ - **Bug Fixed**: Verified fixes for issues #136, #112, #84, and #71.
376
+ - **TypeScript Compatibility**: Fixed `SignalFormField` and `SignalFormFieldConfig` types to be fully compatible with Angular 21+ `FieldTree<string | Date | null, string>` structure. The types now accept `WritableSignal<string | Date | null>` from Angular's Signal Forms, resolving TypeScript compilation errors when using `[field]` binding.
377
+
378
+ ## [2.0.2] - 2026-01-14
379
+
380
+ ### Patch Changes
381
+
382
+ - **Version Update**: Updated to version 2.0.2
383
+ - **Documentation**: Updated all documentation to reflect new version
384
+
385
+ ## [2.0.1] - 2026-01-14
386
+
387
+ ### Patch Changes
388
+
389
+ - **Version Update**: Updated to version 2.0.1
390
+ - **Bug Fixes**: Minor bug fixes and improvements
391
+ - **Documentation**: Updated all documentation to reflect new version
392
+
393
+ ## [2.0.0] - 2026-01-14
394
+
395
+ ### Major Changes
396
+
397
+ - **Version Update**: Updated to version 2.0.0
398
+ - **Breaking Changes**:
399
+ - Updated minimum Angular version requirement to 17.0.0
400
+ - Improved Signal Forms integration
401
+ - Enhanced timezone handling
402
+ - **Documentation**: Updated all documentation to reflect new version
403
+
404
+ ## [1.9.29] - 2026-01-13
405
+
406
+ ### Added
407
+
408
+ - **Angular Signal Forms Validation Support**: Full support for schema-based validation with Angular 21+ Signal Forms
409
+ - Automatically detects and responds to validation errors from the field's `errors()` signal
410
+ - Recognizes `required` validation from schema (e.g., `required(p.dateDue)`)
411
+ - Updates component's `errorState` based on field's `invalid()` signal
412
+ - Reactive updates when validation state changes
413
+ - Resolves [#136](https://github.com/NGXSMK/ngxsmk-datepicker/issues/136) - "datepicker doesn't recognise 'required' attribute in schema"
414
+ - **Validation Error Types**: Added `ValidationError` interface to support Angular Signal Forms error structure
415
+ - **Error State Callback**: Added `onErrorStateChanged` callback to `FieldSyncCallbacks` for validation state tracking
416
+ - **Comprehensive Documentation**: Added `docs/SIGNAL_FORMS_VALIDATION.md` with usage examples, API reference, and migration guide
417
+ - **Test Coverage**: Added comprehensive test suite in `signal-forms-validation.spec.ts` for validation scenarios
418
+ - **Input Attributes Support**: Added support for standard input attributes on the datepicker input element
419
+ - `inputId`: Custom ID support (defaults to component unique ID)
420
+ - `name`: Form name attribute support
421
+ - `autocomplete`: Autocomplete attribute support (defaults to 'off')
422
+ - `aria-invalid`: Accessibility support for invalid state visibility
423
+ - **Keyboard Shortcuts Help Dialog**: Added a built-in help dialog for keyboard shortcuts, accessible via `?` or `Shift + /`.
424
+ - **New Shortcut**: Added `?` keyboard shortcut to toggle the help dialog.
425
+
426
+ ### Enhanced
427
+
428
+ - **Field Sync Service**: Enhanced with new helper methods
429
+ - `readFieldErrors()`: Reads validation errors from field's `errors` signal
430
+ - `readRequiredState()`: Checks for required validation in errors or direct property (prioritizes schema validation)
431
+ - `hasValidationErrors()`: Determines if field has any validation errors
432
+ - **Backward Compatibility**: Maintains full compatibility with:
433
+ - Direct `required` attribute: `<ngxsmk-datepicker required>`
434
+ - Reactive Forms: `<ngxsmk-datepicker [formControl]="dateControl">`
435
+ - Template-driven forms: `<ngxsmk-datepicker [(ngModel)]="date">`
436
+ - Direct `required` property on field: `field.required = true`
437
+
438
+ ### Fixed
439
+
440
+ - **Header Layout**: Fixed CSS issue where the datepicker header width was not spanning the full container width, ensuring consistent layout across all screen sizes.
441
+ - **Angular Signal Forms Schema Validation**: Fixed issue where `required` attribute from schema was not properly reflected on the input and form validation
442
+ - **Month Navigation**: Fixed a critical bug where navigating to the next month would skip a month (e.g., Jan -> Mar) if the current date was the 31st (due to JS Date overflow). Navigation now correctly calculates from the start of the month.
443
+ - **Signal Forms Integration**: Critical fix for `[field]` binding where Signal fields (passed as functions) were being ignored, preventing validation metadata (like `.required`) from being read.
444
+ - **Range Navigation**: Fixed usability issue where selecting an end date in a different month would unexpectedly reset the calendar view back to the start date's month, causing confusion.
445
+ - **Field Sync Service**: Updated `readRequiredState` and `readDisabledState` to correctly process function-type fields (Signals).
446
+
447
+ ### Changed
448
+
449
+ - **Version Update**: Updated to version 1.9.29
450
+
451
+ ## [1.9.27] - 2026-01-10
452
+
453
+ ### Refactored
454
+
455
+ - **Modern Control Flow**: Fully migrated all standalone components (`NgxsmkDatepickerComponent`, `CalendarHeaderComponent`, `CalendarMonthViewComponent`, `CalendarYearViewComponent`, `TimeSelectionComponent`, `CustomSelectComponent`) to modern Angular `@if` and `@for` block syntax.
456
+ - **Optimized Imports**: Replaced monolithic `CommonModule` with individual directive and pipe imports (`NgClass`, `NgTemplateOutlet`, `DatePipe`) in all standalone components. This improves tree-shaking and resolves resolution conflicts in some environments.
457
+
458
+ ### Fixed
459
+
460
+ - **Module Resolution**: Resolved "Value could not be determined statically" error when importing standalone library components into traditional NgModules in some monorepo configurations.
461
+ - **Build Process**: Fixed library compilation error (`TS6133`) caused by unused `CommonModule` after migration to modern control flow.
462
+ - **Monorepo Compatibility**: Improved Angular core dependency resolution for example applications to prevent "duplicate symbol" and "exported symbol not found" errors during development.
463
+
464
+ ### Maintenance
465
+
466
+ - **Git**: Added `/examples` directory to `.gitignore` to prevent committing experimental test applications.
467
+
468
+ ### Changed
469
+
470
+ - **Version Update**: Updated to version 1.9.27
471
+
472
+ ## [1.9.26] - 2026-01-09
473
+
474
+ > ⚠️ **DO NOT USE**: This version contains broken styles. Please use v1.9.27 or v1.9.25 instead.
475
+
476
+ ### Refactored
477
+
478
+ - **Core Architecture**: Major refactoring of `NgxsmkDatepickerComponent` to address "God Component" issues
479
+ - Split monolithic component into dedicated sub-components: `CalendarMonthViewComponent`, `CalendarYearViewComponent`
480
+ - Integrated `CalendarHeaderComponent` and `TimeSelectionComponent` to handle specific functional areas
481
+ - Removed 1000+ lines of inline template code, significantly improving maintainability and readability
482
+ - Improved strict template type checking support
483
+ - **No breaking changes** to the public API
484
+
485
+ ### Fixed
486
+
487
+ - **Ionic Integration**: Fixed issue where `ionic-integration.css` was not exported in the package bundle
488
+ - Moved styles to allow correct exporting via package logic
489
+ - Ensures `@import 'ngxsmk-datepicker/styles/ionic-integration.css'` works as documented
490
+ - Resolves [#123](https://github.com/NGXSMK/ngxsmk-datepicker/issues/123)
491
+
492
+ ### Fixed (Mobile UI)
493
+
494
+ - **Mobile View Styles**: Enhanced mobile UI styles for both Angular and Ionic projects
495
+ - Added proper positioning and animations for `bottom-sheet` and `fullscreen` mobile modes
496
+ - Fixed missing styles in core `datepicker.css` that prevented `mobileModalStyle` from working correctly
497
+ - Improved gesture handling and transition animations for mobile devices
498
+
499
+ ### Changed
500
+
501
+ - **Version Update**: Updated to version 1.9.26
502
+
503
+ ## [1.9.25] - 2026-01-06
504
+
505
+ ### Fixed
506
+
507
+ - **IDE Support**: Fixed "This component requires inline template type-checking" error by including all source files in tsconfig
508
+ - Ensures accurate template type checking in VS Code and other IDEs
509
+ - **NPM Package**: Fixed issue where `README.md` was missing from the npm package
510
+ - Updated build scripts to ensure `README.md` is correctly included in the distribution
511
+ - Ensures proper documentation rendering on npmjs.com
512
+
513
+ ### Changed
514
+
515
+ - **Version Update**: Updated to version 1.9.25
516
+
517
+ ## [1.9.23] - 2025-12-15
518
+
519
+ ### Fixed
520
+
521
+ - **Signal Forms Dirty State Tracking (Issue #112)**: Fixed issue where Angular Signal Forms were not being marked as dirty when date values changed through the `[field]` binding
522
+ - Improved `updateFieldFromInternal()` method to always prefer `setValue()` and `updateValue()` methods over direct signal mutation
523
+ - Added dev mode warnings when falling back to direct signal mutation, which may bypass dirty state tracking
524
+ - Enhanced error handling to track which update method succeeded and provide better diagnostics
525
+ - The datepicker now properly marks forms as dirty when using `[field]` binding with Angular 21+ Signal Forms
526
+ - Added comprehensive test coverage for Signal Forms dirty state tracking
527
+ - Updated documentation with detailed guidance on proper usage patterns and troubleshooting
528
+ - Resolves [#112](https://github.com/NGXSMK/ngxsmk-datepicker/issues/112)
529
+
530
+ - **CSS Variables Theming (Issue #84)**: Fixed issue where CSS variables theming was not working when variables were defined in the global `:root` selector
531
+ - Enhanced CSS selector from `:root` to `:root, :root > body` for higher specificity
532
+ - Added `!important` flags to inline styles to ensure they override existing styles
533
+ - ThemeBuilderService now properly overrides global stylesheet variables
534
+ - Updated documentation to explain the fix and provide guidance
535
+ - Resolves [#84](https://github.com/NGXSMK/ngxsmk-datepicker/issues/84)
536
+
537
+ ### Changed
538
+
539
+ - **Version Update**: Updated to version 1.9.23
540
+
541
+ ## [1.9.22] - 2025-12-14
542
+
543
+ ### Fixed
544
+
545
+ - **Form Control Value Initialization**: Fixed issue where datepicker was not properly updating the displayed month when initialized with form control values
546
+ - Added `_updateMemoSignals()` call in `writeValue()` method to ensure month/year signals are properly updated
547
+ - Added `scheduleChangeDetection()` to trigger UI updates when form control values are set
548
+ - Ensures datepicker correctly displays the month from form control values instead of defaulting to current month
549
+ - Resolves issue where demo app datepickers were showing December instead of the correct month from form control values
550
+ - Fixes calendar month display when using Reactive Forms with initial values
551
+
552
+ - **Locale Week Start Detection**: Fixed `getFirstDayOfWeek()` function to properly return 1 for en-GB locale
553
+ - Added fallback logic for locales where `Intl.Locale.weekInfo` is not available (older browsers/environments)
554
+ - Implemented locale-based mapping for common locales (en-GB, en-AU, en-NZ, and most European locales return 1 for Monday)
555
+ - Now correctly returns Monday (1) for en-GB and other European locales
556
+ - Maintains backward compatibility with en-US and other locales that use Sunday (0) as first day
557
+ - All calendar utils tests now passing (19/19 tests)
558
+
559
+ ### Changed
560
+
561
+ - **Version Update**: Updated to version 1.9.22
562
+
563
+ ## [1.9.21] - 2025-12-10
564
+
565
+ ### Added
566
+
567
+ - **Mobile-Specific Features**: Comprehensive mobile optimization and native integration
568
+ - Native date picker integration with `useNativePicker` input for automatic native picker on mobile devices
569
+ - Bottom sheet modal style with swipe-to-dismiss gesture support
570
+ - Mobile-optimized time picker with enhanced touch interactions
571
+ - Enhanced gesture support: double-tap on today to select, swipe up/down for year navigation
572
+ - Haptic feedback support with `enableHapticFeedback` input (light, medium, heavy vibrations)
573
+ - Mobile keyboard optimizations for better input experience
574
+ - Mobile-specific animations and transitions
575
+ - Auto-detection of mobile devices with `autoDetectMobile` input
576
+ - Mobile modal styles: `bottom-sheet`, `center`, and `fullscreen` options
577
+
578
+ - **Advanced Selection Modes**: Extended selection capabilities beyond single/range/multiple
579
+ - Week selection mode: Select entire weeks with configurable week start day
580
+ - Month selection mode: Select entire months with start/end dates
581
+ - Quarter selection mode: Select quarters (Q1, Q2, Q3, Q4) with proper date ranges
582
+ - Year selection mode: Select entire years with January 1st to December 31st ranges
583
+ - All new modes work seamlessly with existing validation, constraints, and formatting
584
+
585
+ - **Enhanced Time Selection**: Improved time picker functionality
586
+ - Seconds selection with `showSeconds` input and `secondInterval` configuration
587
+ - `currentSecond` property for programmatic second control
588
+ - Infrastructure for time range selection (future enhancement)
589
+
590
+ - **Code Refactoring**: Improved maintainability and performance
591
+ - `CalendarGenerationService`: Extracted calendar generation logic for better separation of concerns
592
+ - `DisplayFormattingService`: Centralized display formatting logic with support for all selection modes
593
+ - `DateValidationService`: Extracted date validation logic for reusable validation across components
594
+ - Reduced main component size and complexity
595
+ - Improved code organization and testability
596
+
597
+ - **Accessibility Enhancements**: Improved screen reader and keyboard navigation
598
+ - Enhanced ARIA live region announcements with debouncing and queue management
599
+ - Improved focus trap management with proper focus return on close
600
+ - Better screen reader support for all new selection modes
601
+ - High contrast mode styling improvements
602
+
603
+ - **Performance Optimizations**: Infrastructure for better performance
604
+ - Virtual scrolling infrastructure for year/decade views (ready for future implementation)
605
+ - Lazy loading calendar months with intelligent caching (up to 24 months)
606
+ - Calendar month cache with automatic size management
607
+ - Preloading of adjacent months for smoother navigation
608
+
609
+ - **Test Coverage**: Comprehensive test suite updates
610
+ - New service tests: `CalendarGenerationService`, `DisplayFormattingService`, `DateValidationService`
611
+ - Updated comprehensive component tests with new selection modes
612
+ - Updated utility function tests for week/month/quarter/year helpers
613
+ - Updated E2E tests for mobile features and new selection modes
614
+ - All 414 tests passing with improved coverage
615
+
616
+ ### Changed
617
+
618
+ - **Version Update**: Updated to version 1.9.21
619
+ - **Hooks Interface**: Extended hooks interface to support new selection modes (`week`, `month`, `quarter`, `year`)
620
+ - **Type Definitions**: Updated `DatepickerValue` type to explicitly handle range mode with `[Date, Date | null]`
621
+ - **Service Architecture**: Refactored component to use new services for better maintainability
622
+
623
+ ### Fixed
624
+
625
+ - **Angular 21 Signal Forms Integration (Issue #80)**: Fixed broken `[field]` input binding with Angular 21 Signal Forms
626
+ - Improved signal detection in `readFieldValue()` to handle Angular 21's `FieldTree<Date, string>` structure
627
+ - Enhanced effect setup to properly track Signal Forms dependencies when `field.value` is a function returning a signal
628
+ - Fixed `updateFieldFromInternal()` to handle cases where `field.value` is a function that returns a writable signal
629
+ - Now correctly handles Angular 21 Signal Forms where `field.value` is a function that returns the actual signal
630
+ - Resolves [#80](https://github.com/NGXSMK/ngxsmk-datepicker/issues/80)
631
+ - **Build Issues**: Fixed TypeScript compilation errors related to strict null checks
632
+ - **Test Failures**: Fixed async timing issues in AriaLiveService tests
633
+ - **Calendar Generation**: Fixed structural issues in calendar generation method
634
+ - **Type Safety**: Improved type safety with explicit null checks and proper type definitions
635
+
636
+ ### Migration Notes
637
+
638
+ - This is a patch version update
639
+ - No breaking changes from v1.9.20
640
+ - All changes are backward compatible
641
+ - Compatible with Angular 17-22
642
+ - New features are opt-in and don't affect existing implementations
643
+ - Mobile features automatically detect mobile devices but can be disabled with `autoDetectMobile="false"`
644
+ - New selection modes extend existing `mode` input with additional options
645
+
646
+ ## [1.9.20] - 2025-12-06
647
+
648
+ ### Fixed
649
+
650
+ - **Test Environment Compatibility (Issue #71)**: Fixed `TypeError: window.matchMedia is not a function` error in test environments (jsdom/Vitest)
651
+ - Added try-catch block around `window.matchMedia` call in `applyAnimationConfig()` method
652
+ - Component now gracefully handles missing `matchMedia` API in test environments
653
+ - Prevents test failures when running with Vitest and jsdom
654
+ - Added comprehensive test coverage for `matchMedia` compatibility scenarios
655
+
656
+ ### Changed
657
+
658
+ - **Version Update**: Updated to version 1.9.20
659
+
660
+ ### Migration Notes
661
+
662
+ - This is a patch version update
663
+ - No breaking changes from v1.9.19
664
+ - All changes are backward compatible
665
+ - Compatible with Angular 17-22
666
+ - Fixes test compatibility issues with Vitest and jsdom environments
667
+
668
+ ## [1.9.19] - 2025-01-15
669
+
670
+ ### Added
671
+
672
+ - **Comprehensive Responsive Layout Redesign**: Complete redesign of demo project layout for all screen sizes
673
+ - Redesigned navbar for all breakpoints (320px-374px, 375px-479px, 480px-599px, 600px-767px, 768px-1023px, 1024px+)
674
+ - Enhanced sidebar navigation with mobile drawer, tablet collapsible, and desktop fixed layouts
675
+ - Responsive hero section with adaptive typography and button layouts
676
+ - Feature grid responsive design (1 column → 2 columns → 3 columns → 4 columns)
677
+ - Optimized content sections with responsive padding, typography, and spacing
678
+ - Improved example demo containers, code blocks, mobile preview containers, and result boxes
679
+ - Better touch targets and visual hierarchy across all breakpoints
680
+
681
+ ### Changed
682
+
683
+ - **Version Update**: Updated to version 1.9.19
684
+ - **Meta Tag Update**: Replaced deprecated `apple-mobile-web-app-capable` with `mobile-web-app-capable`
685
+ - **Code Cleanup**: Removed unnecessary comments from SCSS files for cleaner codebase
686
+
687
+ ### Migration Notes
688
+
689
+ - This is a patch version update
690
+ - No breaking changes from v1.9.18
691
+ - All changes are backward compatible
692
+ - Compatible with Angular 17-22
693
+ - Demo project layout improvements are automatic and require no code changes
694
+
695
+ ## [1.9.18] - 2025-11-22
696
+
697
+ ### Fixed
698
+
699
+ - **Mobile Touch Event Handling**: Improved touch listener attachment when calendar opens on mobile devices
700
+ - Touch listeners now properly attach when calendar first opens, eliminating the need to navigate months first
701
+ - Added retry mechanism with multiple attempts to ensure listeners are attached even on slower mobile devices
702
+ - Improved timing with double `requestAnimationFrame` calls and multiple retry strategies
703
+ - Enhanced mobile rendering timing to handle DOM delays
704
+
705
+ ### Changed
706
+
707
+ - **Version Update**: Updated to version 1.9.18
708
+
709
+ ### Migration Notes
710
+
711
+ - This is a patch version update
712
+ - No breaking changes from v1.9.17
713
+ - All changes are backward compatible
714
+ - Compatible with Angular 17-22
715
+ - Improved mobile experience with better touch event handling
716
+
717
+ ## [1.9.17] - 2025-11-21
718
+
719
+ ### Added
720
+
721
+ - **Calendar Button Visibility Control**: Added `showCalendarButton` input property to show/hide the calendar icon button
722
+ - Defaults to `true` for backward compatibility
723
+ - When set to `false`, users can still open the calendar by clicking the input field
724
+ - Useful for custom UI designs or when using `allowTyping` with custom calendar triggers
725
+ - **Calendar Button Styling**: Added `calendarBtn` to `DatepickerClasses` for custom styling of the calendar button
726
+
727
+ ### Changed
728
+
729
+ - **Version Update**: Updated to version 1.9.17
730
+ - **Type Compatibility**: Updated `SignalFormField` type to be fully compatible with Angular 21's `FieldTree<Date, string>` types
731
+
732
+ ### Migration Notes
733
+
734
+ - This is a patch version update
735
+ - No breaking changes from v1.9.16
736
+ - All changes are backward compatible
737
+ - Compatible with Angular 17-22
738
+ - The calendar button is visible by default (`showCalendarButton="true"`), existing behavior unchanged
739
+
740
+ ## [1.9.16] - 2025-11-20
741
+
742
+ ### Fixed
743
+
744
+ - **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 }`
745
+ - Added memo cache invalidation before calendar generation when clicking dates from previous/next months in range mode
746
+ - Fixed issue where clicking dates from previous months would navigate but memoized functions would use stale month/year values
747
+ - Now properly invalidates memo cache in single, range, and multiple modes when navigating to different months via date clicks
748
+ - Users can now select dates from previous months in range mode without issues, allowing proper range selection across month boundaries
749
+
750
+ ### Changed
751
+
752
+ - **Version Update**: Updated to version 1.9.16
753
+ - **Angular 21 Support**: Updated dependencies and peer dependencies to support Angular 21 (officially released)
754
+ - Updated devDependencies to Angular 21.0.0
755
+ - Updated peer dependencies to support Angular 17-22 (`>=17.0.0 <24.0.0`)
756
+ - Full compatibility with Angular 21 including Signal Forms support
757
+ - **Signal Forms**: Full support for Angular 21 Signal Forms with `[field]` input binding (experimental feature)
758
+ - **Zoneless by Default**: Compatible with Angular 21 applications that don't include Zone.js by default
759
+ - **Vitest Compatible**: Works with Angular 21's new default Vitest test runner (library tests use Karma/Jasmine, but library is compatible with Vitest-based apps)
760
+ - **Angular Aria Compatible**: Built-in ARIA support works alongside Angular Aria components (uses custom AriaLiveService for screen reader announcements)
761
+
762
+ ### Migration Notes
763
+
764
+ - This is a patch version update with bug fixes and Angular 21 support
765
+ - No breaking changes from v1.9.15
766
+ - All fixes are backward compatible
767
+ - Compatible with Angular 17-22 (including officially released Angular 21)
768
+
769
+ ## [1.9.15] - 2025-11-20
770
+
771
+ ### Fixed
772
+
773
+ - **Moment Object Binding with ngModel**: Fixed issue where Moment.js objects passed via `[(ngModel)]` were not binding correctly with the datepicker
774
+ - Updated `writeValue()` method to normalize Moment.js objects before passing to `initializeValue()`
775
+ - Ensures Moment.js objects (including those with `utcOffset()` applied) are properly converted to Date objects when binding with template-driven forms
776
+ - Now correctly handles `moment(response.Date).utcOffset(timezone)` when setting via ngModel
777
+ - **Date Clicks After Month Navigation**: Fixed issue where dates became unclickable after navigating backward or forward months
778
+ - Updated `isDateDisabledMemo` getter to properly invalidate cached memoized function when month/year changes
779
+ - Added month/year change detection to ensure disabled date cache is refreshed after navigation
780
+ - Dates in previous/next months are now properly clickable without needing to close and reopen the datepicker
781
+ - **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 }`
782
+ - Added memo cache invalidation before calendar generation when clicking dates from previous/next months in range mode
783
+ - Fixed issue where clicking dates from previous months would navigate but memoized functions would use stale month/year values
784
+ - Now properly invalidates memo cache in single, range, and multiple modes when navigating to different months via date clicks
785
+ - Users can now select dates from previous months in range mode without issues, allowing proper range selection across month boundaries
786
+
787
+ ### Changed
788
+
789
+ - **Version Update**: Updated to version 1.9.15
790
+
791
+ ### Migration Notes
792
+
793
+ - This is a patch version update with bug fixes only
794
+ - No breaking changes from v1.9.14
795
+ - All fixes are backward compatible
796
+ - Compatible with Angular 17 and up versions
797
+
798
+ ## [1.9.14] - 2025-11-20
799
+
800
+ ### Fixed
801
+
802
+ - **Date Picker Selection Issue**: Fixed issue where date picker was not working properly when selecting dates, especially in range mode
803
+ - Added proper change detection scheduling when setting start date in range mode
804
+ - Added memo cache invalidation to ensure UI updates correctly reflect selected dates
805
+ - Fixed UI not updating when only start date is selected in range mode
806
+ - Dates now properly show as selected and calendar updates correctly in all selection modes
807
+ - **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
808
+ - Added `momentToDate()` method that detects and preserves timezone offsets from Moment.js objects
809
+ - Uses moment's `format('YYYY-MM-DDTHH:mm:ss.SSSZ')` to preserve offset information
810
+ - Now correctly handles `moment().utcOffset('-0600')` without requiring `toDate()` which loses timezone information
811
+ - Works for single dates, range values, and array of dates
812
+
813
+ ### Changed
814
+
815
+ - **Version Update**: Updated to version 1.9.14
816
+
817
+ ### Migration Notes
818
+
819
+ - This is a patch version update with bug fixes only
820
+ - No breaking changes from v1.9.13
821
+ - All fixes are backward compatible
822
+
823
+ ## [1.9.13] - 2025-11-19
824
+
825
+ ### Fixed
826
+
827
+ - **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)]`
828
+ - Changed `emitValue` method to use `_normalizeValue()` instead of `_normalizeDate()` to properly handle range objects `{ start: Date, end: Date }`
829
+ - Now correctly emits date values for all modes (single, range, multiple)
830
+ - **Range Mode Date Selection**: Fixed issue where dates became disabled/unclickable after navigating to previous or next months in range mode
831
+ - Updated `changeMonth()` method to properly update month/year signals when navigating
832
+ - Fixed `onDateClick()` for all modes (single, range, multiple) to update signals when clicking dates in different months
833
+ - Fixed `onYearClick()`, `onYearSelectChange()`, and `onDecadeClick()` to update signals
834
+ - Ensures memoized `isDateDisabledMemo` function uses correct month/year values after navigation
835
+ - Dates in previous/next months are now properly selectable without needing to close and reopen the datepicker
836
+ - **Moment.js Object Handling**: Fixed issue where Moment.js objects in range values and arrays were not being properly normalized
837
+ - Enhanced `_normalizeValue()` method to explicitly detect and convert Moment.js objects in range objects (`{ start, end }`)
838
+ - Enhanced array value normalization to properly handle Moment.js objects in multiple date selections
839
+ - Ensures Moment.js objects are correctly converted to Date objects before emission in `valueChange` event
840
+
841
+ ### Changed
842
+
843
+ - **Version Update**: Updated to version 1.9.13
844
+
845
+ ### Migration Notes
846
+
847
+ - This is a patch version update with bug fixes only
848
+ - No breaking changes from v1.9.12
849
+ - All fixes are backward compatible
850
+
851
+ ## [1.9.12] - 2025-11-19
852
+
853
+ ### Added
854
+
855
+ - **SEO Optimization**: Comprehensive search engine optimization improvements
856
+ - Enhanced meta tags with expanded keywords, geo-location, and Apple mobile web app tags
857
+ - Complete Open Graph implementation for social media sharing (Facebook, LinkedIn)
858
+ - Enhanced Twitter Card metadata with additional labels and image alt text
859
+ - Multi-locale Open Graph support (en_US, es_ES, fr_FR, de_DE)
860
+ - Structured data (Schema.org) with SoftwareApplication, WebPage, and HowTo schemas
861
+ - robots.txt file with proper crawl directives and sitemap reference
862
+ - sitemap.xml with all important pages, priorities, and change frequencies
863
+ - SEO documentation guide (docs/SEO.md) with best practices and monitoring recommendations
864
+ - **Package Keywords Expansion**: Expanded npm package keywords from 14 to 38 keywords
865
+ - Added keywords for features (signal-forms, SSR, zoneless, accessibility)
866
+ - Added keywords for use cases (date-picker, time-picker, holiday-calendar)
867
+ - Added keywords for qualities (lightweight, customizable, open-source, MIT)
868
+ - Improved discoverability on npm and search engines
869
+ - **README SEO Enhancements**: Added downloads badge and expanded SEO keywords section
870
+ - More comprehensive keyword coverage for better search visibility
871
+ - Enhanced description with additional relevant terms
872
+
873
+ ### Changed
874
+
875
+ - **Version Update**: Updated to version 1.9.12
876
+ - **Multi-Calendar Spacing**: Increased gap between multiple calendars from 16px to 32px for better visual separation
877
+ - Applied to horizontal, vertical, and auto layouts
878
+ - Improved spacing consistency across all multi-calendar configurations
879
+ - **Multi-Calendar Container Sizing**: Enhanced container width handling for multi-calendar layouts
880
+ - Changed from fixed `width: 100%` to `width: fit-content` for better content fitting
881
+ - Increased max-width from 1200px to 1400px to accommodate more calendars
882
+ - Containers now properly expand to fit all calendars without overlapping
883
+ - **Demo App Select Inputs**: Enhanced styling for all select inputs in the demo application
884
+ - Custom dropdown arrow icons with theme-aware colors
885
+ - Improved hover and focus states with smooth transitions
886
+ - Better visual consistency with the overall design system
887
+ - Full dark theme support
888
+ - **Build Configuration**: Updated angular.json to include SEO files in build output
889
+ - robots.txt and sitemap.xml now properly copied to build root
890
+ - Files accessible at site root for search engine crawlers
891
+
892
+ ### Removed
893
+
894
+ - **Demo App Sections**: Removed "2 Calendars Side-by-Side" and "3 Calendars Side-by-Side" demo sections
895
+ - Cleaned up unused TypeScript variables (`multiCalendarRange2`, `multiCalendarSingle3`)
896
+
897
+ ### Fixed
898
+
899
+ - **Multi-Calendar Overlapping**: Fixed issue where multiple calendars would overlap when displayed side-by-side
900
+ - Added proper `box-sizing: border-box` to calendar months
901
+ - Reduced container padding for multi-calendar layouts to provide more space
902
+ - Ensured containers expand to fit content with proper gap spacing
903
+ - **Test Suite**: Fixed TypeScript compilation error in issue-33.spec.ts
904
+ - Fixed undefined `dayNumbers` variable in test assertion
905
+ - Added proper day number collection for debugging when test fails
906
+ - Improved test error messages with actual day numbers found
907
+
908
+ ### Migration Notes
909
+
910
+ - This is a minor version update with backward compatibility
911
+ - No breaking changes from v1.9.11
912
+ - SEO improvements are automatic and require no code changes
913
+ - See [MIGRATION.md](MIGRATION.md) for detailed migration guide
914
+ - See [docs/SEO.md](projects/ngxsmk-datepicker/docs/SEO.md) for SEO best practices
915
+
916
+ ## [1.9.11] - 2025-11-17
917
+
918
+ ### Fixed
919
+
920
+ - **Moment.js Integration with Custom Formats**: Fixed critical issue where Moment.js objects with custom date formats would not populate correctly
921
+ - Added `isMomentObject()` helper method to safely detect Moment.js instances
922
+ - Enhanced `_normalizeValue()` method to handle Moment.js objects directly by extracting native Date using `.toDate()`
923
+ - Improved `parseCustomDateString()` method to use bracket notation for TypeScript compatibility with dynamic object properties
924
+ - Added comprehensive support for format tokens: YYYY, YY, MM, M, DD, D, hh, h, HH, H, mm, m, ss, s, a, A
925
+ - Resolves issue where `moment(this.date).utcOffset(timezone).format('MM/DD/YYYY hh:mm a')` with `displayFormat="MM/DD/YYYY hh:mm a"` would not populate correctly
926
+ - Maintains full backward compatibility with Date objects, strings, and all other supported formats
927
+
928
+ ### Improved
929
+
930
+ - **Custom Format Parser**: Enhanced format token parsing with better TypeScript compatibility
931
+ - **Moment.js Detection**: More robust detection of Moment.js objects across different versions
932
+ - **Demo Application**: Added working Moment.js integration example with interactive controls
933
+
934
+ ## [1.9.10] - 2025-11-15
935
+
936
+ ### Changed
937
+
938
+ - **Version Update**: Updated to version 1.9.10
939
+
940
+ ### Fixed
941
+
942
+ - **Async Database Value Loading**: Enhanced datepicker to properly handle database values that load asynchronously after component initialization
943
+ - Added fallback sync mechanism in `ngAfterViewInit` to catch async database loads
944
+ - Added delayed sync checks in `ngOnInit`, `ngOnChanges`, and `ngAfterViewInit` to handle field value changes that occur after component initialization
945
+ - Added sync on calendar open, focus events, and touch events to ensure values are populated
946
+ - Extended interval sync duration to 30 seconds (from 10 seconds) with 100ms check intervals
947
+ - Ensures datepicker properly displays database values even when they load after the component is rendered
948
+ - **TypeScript Compilation Error**: Fixed `EffectRef` type error when using Angular 17+ `effect()` API
949
+ - Changed `_fieldEffectDestroy: (() => void) | null` to `_fieldEffectRef: EffectRef | null`
950
+ - Updated effect cleanup to use `effectRef.destroy()` instead of function call
951
+ - Added proper `EffectRef` import from `@angular/core`
952
+ - **Test Configuration**: Fixed test configuration for Angular 17+ compatibility
953
+ - Updated karma configuration to work with `@angular/build:karma` builder
954
+ - Simplified karma.conf.js to remove deprecated plugins
955
+ - Updated test script to target correct project
956
+
957
+ ### Improved
958
+
959
+ - **Async Value Handling**: Improved handling of field values that change asynchronously
960
+ - **Effect Management**: Proper effect lifecycle management with `EffectRef` for correct cleanup
961
+ - **Code Cleanup**: Removed unnecessary comments for cleaner codebase
962
+ - **Test Reliability**: Enhanced test configuration for better reliability across Angular versions
963
+
964
+ ## [1.9.9] - 2025-11-15
965
+
966
+ ### Changed
967
+
968
+ - **Version Update**: Updated to version 1.9.9
969
+
970
+ ### Fixed
971
+
972
+ - **Database Value Population**: Fixed critical issue where datepicker would not populate with values from database when using `[field]` input binding
973
+ - Added `_normalizeValue()` helper method to properly handle all value types (Date objects, strings, range objects, arrays)
974
+ - Updated field effect and related methods to use `_normalizeValue()` instead of `_normalizeDate()` which only handled single dates
975
+ - Fixed issue where string dates from database (common scenario) were not being parsed and displayed correctly
976
+ - Now properly handles Date objects, string dates, range objects `{start: Date, end: Date}`, and arrays of dates
977
+
978
+ ### Improved
979
+
980
+ - **Value Normalization**: Improved value normalization to handle all DatepickerValue types consistently
981
+ - **Database Integration**: Enhanced compatibility with database values in various formats (strings, Date objects, etc.)
982
+
983
+ ## [1.9.8] - 2025-11-14
984
+
985
+ ### Changed
986
+
987
+ - **Version Update**: Updated to version 1.9.8
988
+
989
+ ### Fixed
990
+
991
+ - **Date Selection Reset Issue**: Fixed critical bug where selected dates would reset to today's date when using `[field]` input binding
992
+ - Fixed `applyCurrentTime` to create a new Date object instead of mutating the original, preventing reference issues
993
+ - Added `_isUpdatingFromInternal` flag to prevent field effect from resetting the value when updating internally
994
+ - This ensures selected dates are properly stored in the form field instead of being reset to today
995
+
996
+ ### Improved
997
+
998
+ - **Date Mutation Prevention**: Improved date handling to prevent unintended mutations of date objects
999
+ - **Field Update Stability**: Enhanced field binding stability to prevent value resets during internal updates
1000
+
1001
+ ## [1.9.7] - 2025-11-14
1002
+
1003
+ ### Changed
1004
+
1005
+ - **Version Update**: Updated to version 1.9.7
1006
+
1007
+ ### Fixed
1008
+
1009
+ - **Calendar Population**: Fixed critical issue where datepicker calendar would not populate with dates when opened, especially when multiple datepickers were present in the same form
1010
+ - **Calendar Generation**: Ensured `generateCalendar()` is called when opening the datepicker via click, touch, or programmatic methods
1011
+
1012
+ ### Improved
1013
+
1014
+ - **Calendar Initialization**: Improved calendar initialization to ensure dates are always generated before the calendar becomes visible
1015
+
1016
+ ## [1.9.6] - 2025-11-14
1017
+
1018
+ ### Changed
1019
+
1020
+ - **Version Update**: Updated to version 1.9.6
1021
+
1022
+ ### Fixed
1023
+
1024
+ - **Multiple Datepicker Management**: Fixed issue where multiple datepickers in the same form would open in the same centered location
1025
+ - **Outside Click Detection**: Improved click detection to properly close datepicker when clicking outside the popover and input field
1026
+ - **Auto-close Other Datepickers**: When opening a datepicker, all other open datepickers in the same form are now automatically closed
1027
+ - **Mobile Datepicker Opening**: Fixed issue where datepicker modal would not open on mobile screens
1028
+ - **Datepicker Closing on Mobile**: Fixed issue where datepicker would open and immediately disappear on mobile devices
1029
+ - **Select Box Cursor**: Added pointer cursor to all select boxes (month, year, hour, minute, AM/PM) in the datepicker
1030
+
1031
+ ### Improved
1032
+
1033
+ - **Document Click Handler**: Enhanced document click handler to check if clicks are inside the popover container, not just the input group
1034
+ - **Touch Event Handling**: Improved touch event handling to prevent premature closing on mobile devices
1035
+ - **Instance Management**: Added static instance registry to track all datepicker instances for better coordination
1036
+
1037
+ ## [1.9.5] - 2025-11-14
1038
+
1039
+ ### Changed
1040
+
1041
+ - **Version Update**: Updated to version 1.9.5
1042
+
1043
+ ### Fixed
1044
+
1045
+ - **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
1046
+ - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
1047
+ - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
1048
+ - Maintains backward compatibility with Angular 17-20 where field input is optional
1049
+ - Resolves [#33](https://github.com/NGXSMK/ngxsmk-datepicker/issues/33)
1050
+
1051
+ ## [1.9.4] - 2025-11-14
1052
+
1053
+ ### Changed
1054
+
1055
+ - **Version Update**: Updated to version 1.9.4
1056
+
1057
+ ### Added
1058
+
1059
+ - **Custom Date Format**: New `[displayFormat]` input property to display dates in custom formats
1060
+ - Supports format strings like "MM/DD/YYYY hh:mm A"
1061
+ - Works with date adapters (date-fns, dayjs, luxon) or built-in simple formatter
1062
+ - Supports common format tokens: YYYY, MM, DD, hh, mm, A, etc.
1063
+ - Resolves [#31](https://github.com/NGXSMK/ngxsmk-datepicker/issues/31)
1064
+
1065
+ ### Fixed
1066
+
1067
+ - **Time Selection Dropdowns**: Fixed visibility issues with time selection dropdowns
1068
+ - Dropdowns now properly display and are not clipped by parent containers
1069
+ - Improved z-index handling for time selection dropdowns
1070
+ - Removed unnecessary scrollbars from datepicker wrapper
1071
+ - Fixed overflow and positioning issues in time selection context
1072
+ - Resolves [#32](https://github.com/NGXSMK/ngxsmk-datepicker/issues/32)
1073
+ - **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
1074
+ - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
1075
+ - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
1076
+ - Maintains backward compatibility with Angular 17-20 where field input is optional
1077
+ - Resolves [#33](https://github.com/NGXSMK/ngxsmk-datepicker/issues/33)
1078
+
1079
+ ## [1.9.3] - 2025-11-13
1080
+
1081
+ ### Changed
1082
+
1083
+ - **Version Update**: Updated to version 1.9.3
1084
+
1085
+ ### Added
1086
+
1087
+ - **Time-Only Picker**: New `[timeOnly]` input property to display only time selection without calendar
1088
+ - Hides calendar grid and shows only time controls (hour, minute, AM/PM)
1089
+ - Automatically enables `showTime` when `timeOnly` is true
1090
+ - Perfect for time selection scenarios where date is not needed
1091
+ - Value is still a Date object using today's date with selected time
1092
+ - Placeholder automatically changes to "Select Time" in time-only mode
1093
+ - Resolves [#29](https://github.com/NGXSMK/ngxsmk-datepicker/issues/29)
1094
+ - **Modern Demo App UI**: Complete redesign of the demo application
1095
+ - Modern navbar with glassmorphism effects, search functionality, and improved theme toggle
1096
+ - Redesigned sidebar with gradient backgrounds, smooth animations, and visual indicators
1097
+ - Enhanced icon sizes and better visual hierarchy
1098
+ - Improved responsive design with better mobile experience
1099
+ - Automatic system theme detection (dark/light mode preference)
1100
+ - Gradient accents, shadows, and modern design patterns throughout
1101
+
1102
+ ### Fixed
1103
+
1104
+ - **Test Suite**: Fixed 25+ failing tests across multiple test files
1105
+ - **Date Utils Tests**: Fixed `normalizeDate` comparison to use `.toEqual()` instead of `.toBe()` and corrected invalid date handling
1106
+ - **Calendar Utils Tests**: Updated `generateMonthOptions` to include required year parameter, fixed `generateTimeOptions` to match new return type (object with `hourOptions`/`minuteOptions`), fixed `generateDecadeGrid` expectations, updated `processDateRanges` to match new return type (object instead of array)
1107
+ - **Timezone Utils Tests**: Updated `formatDateWithTimezone` calls to match new signature (locale, options, timezone)
1108
+ - **Edge Cases Tests**: Fixed `update12HourState` to check component properties instead of return value, changed `previewEndDate` to `hoveredDate`, fixed date validation and normalization expectations, corrected `applyCurrentTime` to use `currentDisplayHour` and `isPm`, fixed touch event mocks, added change detection for calendar toggle, corrected `isDateDisabled` null handling
1109
+ - **Adapters Tests**: Fixed date normalization expectations to match actual behavior
1110
+ - **Performance Utils Tests**: Changed array comparison to use `.toEqual()` instead of `.toBe()` for cached results
1111
+ - **RTL Tests**: Fixed RTL detection from locale and document direction by properly setting document direction in tests
1112
+ - **Touch Gestures Tests**: Fixed swipe handling by creating proper array-like TouchList mock that supports both `item()` and `[0]` indexing
1113
+ - **Calendar Views Tests**: Fixed time slider tests to initialize dates and sliders correctly, fixed timeline generation test to call `generateTimeline()` directly
1114
+ - **Recurring Dates Utils Tests**: Fixed pattern matching test to use correct date (Jan 6 is Monday, not Jan 8)
1115
+ - All 353 tests now pass successfully
1116
+
1117
+ ## [1.9.2] - 2025-11-12
1118
+
1119
+ ### Changed
1120
+
1121
+ - **Bundle Optimization**: Optimized bundle size with improved TypeScript compiler settings
1122
+ - Main bundle: ~127KB (source maps excluded from published package)
1123
+ - Enhanced tree-shaking with optimized imports and compiler options
1124
+ - Added `importsNotUsedAsValues: "remove"` for smaller output
1125
+ - Disabled `preserveConstEnums` for better inlining
1126
+ - **Build Process**:
1127
+ - Source maps automatically removed from production builds (saves ~127KB)
1128
+ - Improved build scripts with better error handling
1129
+ - Enhanced bundle analysis that excludes source maps
1130
+ - **Package Configuration**:
1131
+ - Fixed package.json exports to eliminate build warnings
1132
+ - Optimized `files` array to exclude unnecessary files
1133
+ - Updated exports field for better module resolution
1134
+ - **Test Configuration**:
1135
+ - Added Zone.js polyfills to library test configuration
1136
+ - Updated test commands to explicitly target library project
1137
+ - Improved test reliability across Angular versions
1138
+
1139
+ ### Fixed
1140
+
1141
+ - Test suite configuration - added missing Zone.js polyfills for library tests
1142
+ - Bundle analysis now correctly excludes source maps from size calculations
1143
+ - Build warnings from conflicting export conditions resolved
1144
+ - Source map removal script made more resilient for build environments
1145
+
1146
+ ## [1.9.1] - 2025-11-11
1147
+
1148
+ ### Fixed
1149
+
1150
+ - Minor bug fixes and improvements
1151
+
1152
+ ## [1.9.0] - 2025-11-10
1153
+
1154
+ ### Added
1155
+
1156
+ - Extension Points & Hooks system for customization
1157
+ - Enhanced keyboard shortcuts (Y, N, W keys)
1158
+ - Modern UI/UX with improved animations and responsiveness
1159
+ - API documentation with TypeDoc
1160
+ - Semantic release automation
1161
+ - Animation performance optimizations with GPU acceleration
1162
+ - Global search functionality in documentation
1163
+ - Mobile playground for responsive testing
1164
+
1165
+ ### Changed
1166
+
1167
+ - Optimized animations using `transform3d` for hardware acceleration
1168
+ - Reduced animation durations from 0.2s to 0.15s
1169
+ - Improved transition performance with specific property targeting
1170
+ - Updated documentation structure
1171
+ - Enhanced mobile responsiveness
1172
+
1173
+ ### Fixed
1174
+
1175
+ - Animation performance issues
1176
+ - Mobile responsive layout
1177
+ - Sidebar scrollbar styling
1178
+ - TypeScript warnings
1179
+
1180
+ ## [1.8.0] - 2025-11-09
1181
+
1182
+ ### Added
1183
+
1184
+ - Signal Forms support with `[field]` input for Angular 21+
1185
+ - SSR compatibility with platform checks
1186
+ - Zoneless support (works without Zone.js)
1187
+ - Immediate value initialization when `[value]` is set programmatically
1188
+ - Comprehensive documentation for Signals, Signal Forms, and SSR
1189
+ - GitHub Pages deployment automation
1190
+
1191
+ ### Changed
1192
+
1193
+ - Updated peer dependencies to support Angular 17-22 (`>=17.0.0 <24.0.0`)
1194
+ - Added `@angular/forms` as peer dependency
1195
+ - Made `zone.js` optional peer dependency
1196
+ - Enhanced `exports` field in package.json with proper types
1197
+ - Optimized imports for better tree-shaking
1198
+
1199
+ ### Fixed
1200
+
1201
+ - Issue #13: Programmatic value setting now works correctly
1202
+ - SSR compatibility: All browser APIs properly guarded
1203
+ - Value input setter now initializes immediately
1204
+
1205
+ ## [1.7.0] - Previous Release
1206
+
1207
+ _Previous changelog entries..._
1208
+
1209
+ ---
1210
+
1211
+ ## Types of Changes
1212
+
1213
+ - **Added** for new features
1214
+ - **Changed** for changes in existing functionality
1215
+ - **Deprecated** for soon-to-be removed features
1216
+ - **Removed** for now removed features
1217
+ - **Fixed** for any bug fixes
1218
+ - **Security** for vulnerability fixes