ngxsmk-datepicker 3.0.3 → 3.0.4

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