ngxsmk-datepicker 1.9.21 โ†’ 1.9.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,1130 +1,1163 @@
1
- # **ngxsmk-datepicker** - Modern Angular Date Picker Component
2
-
3
- [![npm version](https://img.shields.io/npm/v/ngxsmk-datepicker.svg)](https://www.npmjs.com/package/ngxsmk-datepicker)
4
- [![Angular](https://img.shields.io/badge/Angular-17%2B-red.svg)](https://angular.io/)
5
- [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
- [![Bundle Size](https://img.shields.io/badge/bundle-~127KB-green.svg)](https://bundlephobia.com/package/ngxsmk-datepicker)
7
- [![Downloads](https://img.shields.io/npm/dm/ngxsmk-datepicker.svg)](https://www.npmjs.com/package/ngxsmk-datepicker)
8
-
9
- **npm i ngxsmk-datepicker**
10
-
11
- > **Stable Version**: `1.9.21` is the current stable release. For production use, install the latest version from npm.
12
-
13
- **Latest Version**: Check [npm](https://www.npmjs.com/package/ngxsmk-datepicker) for the most recent release.
14
-
15
- ngxsmk-datepicker โ€“ A modern, powerful, and fully customizable date and date-range picker component designed for Angular 17+ and Ionic applications. Seamlessly integrates with both frameworks, offering a flexible, mobile-friendly UI and advanced features to enhance date selection experiences in your apps.
16
-
17
- **SEO Keywords**: Angular datepicker, Angular date range picker, Angular calendar component, Angular 17 datepicker, Angular 18 datepicker, Angular 19 datepicker, Angular 20 datepicker, Angular 21 datepicker, TypeScript datepicker, standalone Angular component, Signal Forms datepicker, SSR compatible datepicker, zoneless Angular datepicker, lightweight datepicker, customizable datepicker, open source datepicker, free Angular datepicker, MIT license datepicker, accessible datepicker, responsive datepicker, mobile datepicker, touch-friendly datepicker, keyboard accessible datepicker, RTL datepicker, internationalized datepicker, i18n datepicker, localized datepicker, holiday calendar, date time picker, time selection, 12 hour clock, 24 hour clock, date validation, min max dates, disabled dates, date presets, recurring dates, timezone support
18
-
19
- * Github: [https://github.com/NGXSMK/ngxsmk-datepicker](https://github.com/NGXSMK/ngxsmk-datepicker)
20
- * **GitHub Pages Demo**: [https://ngxsmk.github.io/ngxsmk-datepicker/](https://ngxsmk.github.io/ngxsmk-datepicker/)
21
-
22
- Built with Angular Signals for optimal performance and a clean, declarative API. The component is standalone and has zero dependencies, making it lightweight and easy to integrate into any project.
23
-
24
- ## ๐Ÿ“ท Screenshots
25
-
26
- <p align="left">
27
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/1.png" alt="Angular Single Date Selection" width="420" />
28
- &nbsp;&nbsp;
29
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/2.png" alt="Angular Date Range Selection" width="420" />
30
- &nbsp;&nbsp;
31
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/3.png" alt="Angular Date Mobile Screen Playground" width="420" />
32
- </p>
33
-
34
- ## **โœจ Features**
35
-
36
- * **Multiple Selection Modes**: Supports `single`, `range`, `multiple`, `week`, `month`, `quarter`, and `year` date selection.
37
- * **Inline and Popover Display**: Can be rendered inline or as a popover with automatic mode detection.
38
- * **Light and Dark Themes**: Includes built-in support for light and dark modes.
39
- * **Holiday Marking**: Automatically mark and disable holidays using a custom `HolidayProvider`.
40
- * **Holiday Tooltips**: Hover over holiday dates to see holiday names as tooltips.
41
- * **Disabled Dates**: Disable specific dates by passing an array of date strings or Date objects.
42
- * **Date & Time Selection**: Supports optional time inputs with configurable minute and second intervals.
43
- * **Seconds Selection**: Optional seconds picker with `showSeconds` input and configurable `secondInterval`.
44
- * **Time-Only Mode**: Display only time picker without calendar using `[timeOnly]="true"`.
45
- * **12h/24h Time Support**: Uses internal 24-hour timekeeping but displays a user-friendly **12-hour clock with AM/PM toggle**.
46
- * **Mobile-Native Integration**: Automatic native date picker on mobile devices with `useNativePicker` input.
47
- * **Mobile Gestures**: Enhanced touch support with double-tap selection, swipe navigation, and haptic feedback.
48
- * **Mobile Modal Styles**: Bottom sheet, center, and fullscreen modal options for mobile devices.
49
- * **Predefined Date Ranges**: Offers quick selection of common ranges (e.g., "Last 7 Days").
50
- * **Advanced Localization (i18n)**: Automatically handles month/weekday names and week start days based on the browser's locale.
51
- * **Previous Month Context**: Shows last few days of previous month for better date selection context.
52
- * **Custom Styling**: All component elements are prefixed with `ngxsmk-` and themeable via CSS custom properties.
53
- * **Zero Dependencies**: The component is standalone and lightweight.
54
- * **Signal Forms Support**: First-class support for Angular 21+ Signal Forms with `[field]` input (experimental feature).
55
- * **SSR Compatible**: Fully optimized for server-side rendering with Angular Universal.
56
- * **Zoneless Support**: Works with or without Zone.js for optimal performance. Compatible with Angular 21's default zoneless setup.
57
- * **Angular 21 Ready**: Full compatibility with Angular 21 new features including Signal Forms, Vitest, and zoneless by default.
58
- * **E2E Testing**: Comprehensive Playwright-based end-to-end testing infrastructure.
59
- * **Performance Optimized**: Lazy loading calendar months, intelligent caching, and virtual scrolling infrastructure.
60
- * **Extension Points & Hooks**: Comprehensive customization system with hooks for rendering, validation, keyboard shortcuts, and events.
61
- * **Enhanced Keyboard Navigation**: Extended keyboard shortcuts (Y for yesterday, N for tomorrow, W for next week) with custom shortcut support.
62
- * **Modern UI/UX**: Polished design with improved spacing, shadows, animations, and accessibility.
63
- * **Reduced Motion Support**: Respects `prefers-reduced-motion` for accessibility.
64
- * **Comprehensive Testing**: Full test coverage with 353+ tests covering keyboard navigation, time handling, SSR, RTL, touch gestures, and edge cases.
65
- * **CI/CD Integration**: Automated testing and coverage reporting via GitHub Actions.
66
- * **Customizable Calendar Views**: Year-picker, decade-picker, timeline view, and time-slider view for diverse use cases.
67
- * **Modern Demo App**: Beautiful demo application with glassmorphism effects, gradient themes, and responsive design.
68
-
69
- ## **๐Ÿ“‹ Compatibility**
70
-
71
- For detailed compatibility information, see [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
72
-
73
- ### Quick Reference
74
-
75
- | Angular Version | Status | Core Features | Signal Forms | SSR | Zoneless |
76
- |----------------|--------|---------------|--------------|-----|----------|
77
- | Angular 17 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
78
- | Angular 18 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
79
- | Angular 19 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
80
- | Angular 20 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
81
- | Angular 21 | โœ… Fully Supported | โœ… All | โœ… | โœ… | โœ… | **Officially Released** |
82
- | Angular 22+ | ๐Ÿ”„ Future Support | โœ… All | โœ… | โœ… | โœ… |
83
-
84
- **Zone.js**: Optional - The library works with or without Zone.js (zoneless apps supported)
85
-
86
- **SSR**: โœ… Fully compatible with Angular Universal and server-side rendering
87
-
88
- **Peer Dependencies**: `@angular/core >=17.0.0 <24.0.0`
89
-
90
- ## **๐Ÿš€ Installation**
91
-
92
- Install the package using npm:
93
-
94
- npm install ngxsmk-datepicker
95
-
96
- ## **Usage**
97
-
98
- ngxsmk-datepicker is a standalone component, so you can import it directly into your component or module.
99
-
100
- ### Signal Forms (Angular 21)
101
-
102
- You can bind directly to a writable Signal using standard two-way binding. This works seamlessly alongside traditional Reactive Forms.
103
-
104
- ```ts
105
- import { signal } from '@angular/core';
106
- import { DatepickerValue } from 'ngxsmk-datepicker';
107
-
108
- export class MyComponent {
109
- dateSig = signal<DatepickerValue>(null);
110
- }
111
- ```
112
-
113
- ```html
114
- <ngxsmk-datepicker
115
- mode="single"
116
- [value]="dateSig()"
117
- (valueChange)="dateSig.set($event)">
118
- </ngxsmk-datepicker>
119
-
120
- <p>Signal value: {{ dateSig() | json }}</p>
121
- ```
122
-
123
- This pattern is also compatible with computed/linked signals produced by `httpResource`, enabling powerful data flows with Angular 21.
124
-
125
- ### Signal Forms with `[field]` Input (Angular 21+)
126
-
127
- For direct integration with Angular Signal Forms, use the `[field]` input:
128
-
129
- ```typescript
130
- import { Component, signal, form, objectSchema } from '@angular/core';
131
- import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
132
-
133
- @Component({
134
- selector: 'app-form',
135
- standalone: true,
136
- imports: [NgxsmkDatepickerComponent],
137
- template: `
138
- <form>
139
- <ngxsmk-datepicker
140
- [field]="myForm.dateInQuestion"
141
- mode="single"
142
- placeholder="Select a date">
143
- </ngxsmk-datepicker>
144
- </form>
145
- `
146
- })
147
- export class FormComponent {
148
- localObject = signal({ dateInQuestion: new Date() });
149
-
150
- myForm = form(this.localObject, objectSchema({
151
- dateInQuestion: objectSchema<Date>()
152
- }));
153
- }
154
- ```
155
-
156
- The `[field]` input provides automatic two-way binding with signal forms - no manual event handling needed!
157
-
158
- ### Documentation
159
-
160
- - **[Signals Integration Guide](./projects/ngxsmk-datepicker/docs/signals.md)** - Complete guide to using signals with the datepicker
161
- - **[Signal Forms Guide](./projects/ngxsmk-datepicker/docs/signal-forms.md)** - Deep dive into Signal Forms integration
162
- - **[SSR Guide](./projects/ngxsmk-datepicker/docs/ssr.md)** - Server-side rendering setup and best practices
163
- - **[SSR Example](./projects/ngxsmk-datepicker/docs/SSR-EXAMPLE.md)** - Complete Angular Universal example with hydration notes
164
- - **[Extension Points Guide](./projects/ngxsmk-datepicker/docs/extension-points.md)** - Customization hooks and extension points
165
- - **[Theme Tokens Reference](./projects/ngxsmk-datepicker/docs/THEME-TOKENS.md)** - Complete CSS custom properties reference with examples
166
- - **[API Documentation](./projects/ngxsmk-datepicker/docs/API.md)** - Complete public API reference
167
-
168
- #### **1. Import the Component**
169
-
170
- In your component file (e.g., app.component.ts), import NgxsmkDatepickerComponent.
171
-
172
- import { Component } from '@angular/core';
173
- import { NgxsmkDatepickerComponent, DateRange, HolidayProvider } from 'ngxsmk-datepicker';
174
-
175
- @Component({
176
- selector: 'app-root',
177
- standalone: true,
178
- imports: [NgxsmkDatepickerComponent],
179
- templateUrl: './app.component.html',
180
- })
181
- export class AppComponent {
182
- // Example for predefined ranges
183
- public myRanges: DateRange = {
184
- 'Today': [new Date(), new Date()],
185
- 'Last 7 Days': [new Date(new Date().setDate(new Date().getDate() - 6)), new Date()],
186
- 'This Month': [new Date(new Date().getFullYear(), new Date().getMonth(), 1), new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0)],
187
- };
188
-
189
- // Example for disabling weekends
190
- isWeekend = (date: Date): boolean => {
191
- const day = date.getDay();
192
- return day === 0 || day === 6; // Sunday or Saturday
193
- };
194
-
195
- onDateChange(value: Date | { start: Date; end: Date } | Date[]) {
196
- console.log('Date changed:', value);
197
- }
198
- }
199
-
200
- #### **2. Add it to Your Template**
201
-
202
- Use the `<ngxsmk-datepicker>` selector in your HTML template.
203
-
204
- ```html
205
- <h2>Advanced Date Range Picker</h2>
206
-
207
- <ngxsmk-datepicker
208
- [mode]="'range'"
209
- [ranges]="myRanges"
210
- [showTime]="true"
211
- [minuteInterval]="15"
212
- [minDate]="today"
213
- [isInvalidDate]="isWeekend"
214
- [locale]="'en-US'"
215
- [theme]="'light'"
216
- [inline]="'auto'"
217
- (valueChange)="onDateChange($event)"
218
- ></ngxsmk-datepicker>
219
-
220
- #### **3. Disabled Dates Example**
221
-
222
- Disable specific dates by passing an array of date strings or Date objects:
223
-
224
- ```typescript
225
- // In your component
226
- disabledDates = ['10/21/2025', '08/21/2025', '10/15/2025', '10/8/2025', '10/3/2025'];
227
-
228
- // In your template
229
- <ngxsmk-datepicker
230
- [mode]="'single'"
231
- [disabledDates]="disabledDates"
232
- placeholder="Select a date">
233
- </ngxsmk-datepicker>
234
- ```
235
-
236
- #### **4. Holiday Tooltips Example**
237
-
238
- Holiday dates automatically show tooltips when you hover over them:
239
-
240
- ```typescript
241
- // Holiday provider with tooltips
242
- class MyHolidayProvider implements HolidayProvider {
243
- private holidays: { [key: string]: string } = {
244
- '2025-01-01': 'New Year\'s Day',
245
- '2025-07-04': 'Independence Day',
246
- '2025-12-25': 'Christmas Day',
247
- };
248
-
249
- isHoliday(date: Date): boolean {
250
- const key = this.formatDateKey(date);
251
- return !!this.holidays[key];
252
- }
253
-
254
- getHolidayLabel(date: Date): string | null {
255
- const key = this.formatDateKey(date);
256
- return this.holidays[key] || null;
257
- }
258
- }
259
-
260
- // In your template
261
- <ngxsmk-datepicker
262
- [holidayProvider]="holidayProvider"
263
- [disableHolidays]="false"
264
- placeholder="Hover over holidays to see tooltips">
265
- </ngxsmk-datepicker>
266
- ```
267
-
268
- ## **๐Ÿ”Œ Framework Integration**
269
-
270
- ### **Angular Material Form Fields**
271
-
272
- Integrate with Angular Material's form field components for a seamless Material Design experience:
273
-
274
- ```typescript
275
- import { Component } from '@angular/core';
276
- import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
277
- import { MatFormFieldModule } from '@angular/material/form-field';
278
- import { MatInputModule } from '@angular/material/input';
279
- import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
280
-
281
- @Component({
282
- selector: 'app-material-form',
283
- standalone: true,
284
- imports: [
285
- ReactiveFormsModule,
286
- MatFormFieldModule,
287
- MatInputModule,
288
- NgxsmkDatepickerComponent
289
- ],
290
- template: `
291
- <form [formGroup]="myForm">
292
- <mat-form-field appearance="outline">
293
- <mat-label>Select Date</mat-label>
294
- <ngxsmk-datepicker
295
- mode="single"
296
- formControlName="date"
297
- placeholder="Choose a date">
298
- </ngxsmk-datepicker>
299
- </mat-form-field>
300
- </form>
301
- `
302
- })
303
- export class MaterialFormComponent {
304
- myForm = new FormGroup({
305
- date: new FormControl<Date | null>(null)
306
- });
307
- }
308
- ```
309
-
310
- **With Date Range:**
311
- ```html
312
- <mat-form-field appearance="fill">
313
- <mat-label>Date Range</mat-label>
314
- <ngxsmk-datepicker
315
- mode="range"
316
- [showTime]="true"
317
- formControlName="dateRange">
318
- </ngxsmk-datepicker>
319
- </mat-form-field>
320
- ```
321
-
322
- ### **Ionic Components**
323
-
324
- Works seamlessly with Ionic form components and follows Ionic design patterns:
325
-
326
- ```typescript
327
- import { Component } from '@angular/core';
328
- import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
329
- import { IonItem, IonLabel, IonInput } from '@ionic/angular/standalone';
330
- import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
331
-
332
- @Component({
333
- selector: 'app-ionic-form',
334
- standalone: true,
335
- imports: [
336
- ReactiveFormsModule,
337
- IonItem,
338
- IonLabel,
339
- IonInput,
340
- NgxsmkDatepickerComponent
341
- ],
342
- template: `
343
- <form [formGroup]="myForm">
344
- <ion-item>
345
- <ion-label position="stacked">Appointment Date</ion-label>
346
- <ngxsmk-datepicker
347
- mode="single"
348
- formControlName="appointmentDate"
349
- placeholder="Select date">
350
- </ngxsmk-datepicker>
351
- </ion-item>
352
- </form>
353
- `
354
- })
355
- export class IonicFormComponent {
356
- myForm = new FormGroup({
357
- appointmentDate: new FormControl<Date | null>(null)
358
- });
359
- }
360
- ```
361
-
362
- **With Ionic Datetime Styling:**
363
- ```html
364
- <ion-item>
365
- <ion-label>Check-in / Check-out</ion-label>
366
- <ngxsmk-datepicker
367
- mode="range"
368
- [theme]="'light'"
369
- formControlName="bookingDates">
370
- </ngxsmk-datepicker>
371
- </ion-item>
372
- ```
373
-
374
- ### **Plain HTML Inputs**
375
-
376
- Use with standard HTML form inputs for maximum flexibility:
377
-
378
- ```typescript
379
- import { Component } from '@angular/core';
380
- import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
381
- import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
382
-
383
- @Component({
384
- selector: 'app-plain-form',
385
- standalone: true,
386
- imports: [ReactiveFormsModule, NgxsmkDatepickerComponent],
387
- template: `
388
- <form [formGroup]="myForm">
389
- <label for="birthdate">Birth Date</label>
390
- <ngxsmk-datepicker
391
- id="birthdate"
392
- mode="single"
393
- formControlName="birthdate"
394
- placeholder="MM/DD/YYYY">
395
- </ngxsmk-datepicker>
396
-
397
- <button type="submit">Submit</button>
398
- </form>
399
- `
400
- })
401
- export class PlainFormComponent {
402
- myForm = new FormGroup({
403
- birthdate: new FormControl<Date | null>(null)
404
- });
405
- }
406
- ```
407
-
408
- **With Native HTML5 Validation:**
409
- ```html
410
- <form [formGroup]="myForm">
411
- <div class="form-group">
412
- <label for="event-date">Event Date *</label>
413
- <ngxsmk-datepicker
414
- id="event-date"
415
- mode="single"
416
- formControlName="eventDate"
417
- [minDate]="today"
418
- required>
419
- </ngxsmk-datepicker>
420
- </div>
421
- </form>
422
- ```
423
-
424
- ## **โš™๏ธ API Reference**
425
-
426
- ### **Inputs**
427
-
428
- | Property | Type | Default | Description |
429
- |:---------------|:---------------------------------------------------|:----------------------|:--------------------------------------------------------------------------------------------------------------|
430
- | mode | 'single' \| 'range' \| 'multiple' | 'single' | The selection mode. |
431
- | inline | boolean \| 'always' \| 'auto' | false | Controls the display mode. `true` or `'always'` for inline, `'auto'` for responsive. |
432
- | locale | string | navigator.language | Sets the locale for language and regional formatting (e.g., 'en-US', 'de-DE'). |
433
- | theme | 'light' \| 'dark' | 'light' | The color theme. |
434
- | showRanges | boolean | true | If true, displays the predefined ranges panel when in 'range' mode. |
435
- | minDate | DateInput | null | The earliest selectable date. |
436
- | maxDate | DateInput | null | The latest selectable date. |
437
- | isInvalidDate | (date: Date) => boolean | () => false | A function to programmatically disable specific dates. |
438
- | ranges | DateRange | null | An object of predefined date ranges. |
439
- | minuteInterval | number | 1 | Interval for minute dropdown options. |
440
- | showTime | boolean | false | Enables the hour/minute/AM/PM selection section. |
441
- | timeOnly | boolean | false | Display time picker only (no calendar). Automatically enables `showTime`. Perfect for time selection scenarios. |
442
- | value | DatepickerValue | null | Programmatic value setting. Set the datepicker value from code (useful for server-side API data). |
443
- | startAt | DateInput | null | The date to initially center the calendar view on. |
444
- | holidayProvider| HolidayProvider | null | An object that provides holiday information. |
445
- | disableHolidays| boolean | false | If true, disables holiday dates from being selected. |
446
- | disabledDates | (string \| Date)[] | [] | Array of dates to disable. Supports both string dates (MM/DD/YYYY) and Date objects. |
447
- | weekStart | number \| null | null | Override week start day (0=Sunday, 1=Monday, etc.). If null, uses locale-based week start. |
448
- | yearRange | number | 10 | Number of years before/after current year to show in year dropdown. |
449
- | clearLabel | string | 'Clear' | Custom label for the clear button. |
450
- | closeLabel | string | 'Close' | Custom label for the close button. |
451
- | prevMonthAriaLabel | string | 'Previous month' | Aria label for previous month navigation button. |
452
- | nextMonthAriaLabel | string | 'Next month' | Aria label for next month navigation button. |
453
- | clearAriaLabel | string | 'Clear selection' | Aria label for clear button. |
454
- | closeAriaLabel | string | 'Close calendar' | Aria label for close button. |
455
- | classes | { wrapper?, inputGroup?, input?, popover?, container?, calendar?, header?, navPrev?, navNext?, dayCell?, footer?, clearBtn?, closeBtn? } | undefined | Tailwind-friendly class overrides for theming. |
456
-
457
- ### **Outputs**
458
-
459
- | Event | Payload | Description |
460
- |:------------|:---------------------------------------------------|:-----------------------------------------------------------------|
461
- | valueChange | DatepickerValue | Emits the newly selected date, range, or array of dates. |
462
- | action | { type: string; payload?: any } | Emits various events like `dateSelected`, `timeChanged`, etc. |
463
-
464
- ## **๐ŸŽจ Theming**
465
-
466
- ### CSS Variables
467
-
468
- You can easily customize the colors of the datepicker by overriding the CSS custom properties in your own stylesheet.
469
-
470
- ```css
471
- ngxsmk-datepicker {
472
- --datepicker-primary-color: #d9267d;
473
- --datepicker-primary-contrast: #ffffff;
474
- --datepicker-range-background: #fce7f3;
475
- }
476
- ```
477
-
478
- ### Tailwind/ngClass Support
479
-
480
- For Tailwind CSS or custom class-based theming, use the `classes` input:
481
-
482
- ```html
483
- <ngxsmk-datepicker
484
- mode="single"
485
- [classes]="{
486
- inputGroup: 'rounded-lg border',
487
- input: 'px-3 py-2 text-sm',
488
- popover: 'shadow-2xl',
489
- dayCell: 'hover:bg-indigo-50',
490
- footer: 'flex justify-end gap-2',
491
- clearBtn: 'btn btn-ghost',
492
- closeBtn: 'btn btn-primary'
493
- }">
494
- </ngxsmk-datepicker>
495
- ```
496
-
497
- ### Dark Theme
498
-
499
- To enable the dark theme, simply bind the theme input:
500
-
501
- ```html
502
- <ngxsmk-datepicker [theme]="'dark'"></ngxsmk-datepicker>
503
- ```
504
-
505
- ## **๐ŸŒ Localization**
506
-
507
- The `locale` input controls all internationalization. It automatically formats month names, weekday names, and sets the first day of the week.
508
-
509
- ```html
510
- <ngxsmk-datepicker [locale]="'de-DE'"></ngxsmk-datepicker>
511
-
512
- <ngxsmk-datepicker [locale]="'fr-FR'"></ngxsmk-datepicker>
513
- ```
514
-
515
- The datepicker automatically detects the browser's locale if not specified. For SSR applications, explicitly set the locale to ensure consistent rendering on both server and client.
516
-
517
- ## **๐Ÿ–ฅ๏ธ Server-Side Rendering (SSR)**
518
-
519
- The datepicker is fully compatible with Angular Universal and server-side rendering:
520
-
521
- - โœ… All browser APIs are platform-checked
522
- - โœ… No `window` or `document` access during initialization
523
- - โœ… Works with partial hydration
524
- - โœ… Compatible with zoneless applications
525
-
526
- See the [SSR Guide](./projects/ngxsmk-datepicker/docs/ssr.md) for detailed setup instructions.
527
-
528
- ## **โŒจ๏ธ Keyboard Navigation**
529
-
530
- The datepicker supports full keyboard navigation for accessibility:
531
-
532
- ### Built-in Shortcuts
533
-
534
- - **Arrow Keys** (โ† โ†’ โ†‘ โ†“): Navigate between dates
535
- - **Page Up/Down**: Navigate months (Shift + Page Up/Down for years)
536
- - **Home/End**: Jump to first/last day of month
537
- - **Enter/Space**: Select focused date
538
- - **Escape**: Close calendar (popover mode)
539
- - **T**: Select today's date
540
- - **Y**: Select yesterday
541
- - **N**: Select tomorrow
542
- - **W**: Select next week (7 days from today)
543
- - **Tab**: Navigate between interactive elements
544
-
545
- ### Custom Keyboard Shortcuts
546
-
547
- You can add custom keyboard shortcuts using the `hooks` input or `customShortcuts` input:
548
-
549
- ```typescript
550
- import { DatepickerHooks, KeyboardShortcutContext } from 'ngxsmk-datepicker';
551
-
552
- const myHooks: DatepickerHooks = {
553
- handleShortcut: (event, context) => {
554
- if (event.ctrlKey && event.key === '1') {
555
- // Custom action
556
- return true; // Handled
557
- }
558
- return false; // Use default
559
- }
560
- };
561
- ```
562
-
563
- ```html
564
- <ngxsmk-datepicker
565
- [hooks]="myHooks"
566
- [customShortcuts]="shortcuts"
567
- mode="single">
568
- </ngxsmk-datepicker>
569
- ```
570
-
571
- All date cells are keyboard accessible with proper ARIA attributes for screen readers.
572
-
573
- See [Extension Points Guide](./projects/ngxsmk-datepicker/docs/extension-points.md) for detailed customization options.
574
-
575
- ## **๐Ÿš€ Performance Optimizations**
576
-
577
- This library has been optimized for maximum performance:
578
-
579
- * **30% Smaller Bundle**: Optimized build configuration and tree-shaking
580
- * **40% Faster Rendering**: OnPush change detection strategy with proper triggers
581
- * **60% Faster Selection**: Memoized date comparisons and debounced operations
582
- * **Zero Dependencies**: Standalone component with no external dependencies
583
- * **Tree-shakable**: Only import what you need
584
- * **Memory Efficient**: Cache size limits prevent memory leaks
585
- * **Hardware Accelerated**: CSS optimizations for smooth animations
586
- * **Mobile Optimized**: Touch-friendly interactions and responsive design
587
-
588
- ## **๐Ÿ› Bug Fixes & Improvements**
589
-
590
- ### **Critical Bug Fixes in v1.4.15:**
591
- - โœ… **Change Detection**: Fixed OnPush change detection issues with proper `markForCheck()` triggers
592
- - โœ… **Date Comparison**: Fixed null safety issues in date range comparisons
593
- - โœ… **Memory Leaks**: Added cache size limits to prevent memory leaks
594
- - โœ… **Type Safety**: Improved TypeScript types and null safety checks
595
- - โœ… **Mobile UX**: Enhanced mobile interactions and touch feedback
596
- - โœ… **Performance**: Optimized template bindings with memoized functions
597
- - โœ… **Accessibility**: Better focus states and keyboard navigation
598
- - โœ… **Build System**: Improved build configuration and optimization
599
-
600
- ### **Performance Enhancements:**
601
- - ๐Ÿš€ **Optimized Bundle Size**: Main bundle ~127KB (source maps excluded from published package)
602
- - ๐Ÿš€ **40% Faster Rendering**: Enhanced OnPush change detection
603
- - ๐Ÿš€ **60% Faster Selection**: Memoized date comparisons
604
- - ๐Ÿš€ **Memory Efficient**: Cache size limits prevent memory leaks
605
- - ๐Ÿš€ **Hardware Accelerated**: CSS optimizations for smooth animations
606
- - ๐Ÿš€ **Better Tree-Shaking**: Optimized TypeScript compiler settings for smaller output
607
- - ๐Ÿš€ **Production Optimized**: Source maps automatically removed from production builds
608
-
609
- ## **๐Ÿ“ฑ Demo Application**
610
-
611
- A comprehensive demo application is included to showcase all features with a modern, polished UI:
612
-
613
- ```bash
614
- # Clone the repository
615
- git clone https://github.com/NGXSMK/ngxsmk-datepicker.git
616
- cd ngxsmk-datepicker
617
-
618
- # Install dependencies
619
- npm install
620
-
621
- # Run the demo app
622
- npm start
623
- ```
624
-
625
- The demo includes:
626
- - **Modern UI Design**: Beautiful glassmorphism effects, gradient themes, and polished visual hierarchy
627
- - **Responsive Navigation**: Modern navbar with search, theme toggle, and mobile-friendly menu
628
- - **Enhanced Sidebar**: Redesigned documentation sidebar with smooth animations and visual indicators
629
- - **Signal Forms (Angular 21)** with writable signal binding examples
630
- - **Theming** with CSS variables and Tailwind classes examples
631
- - **Customization & A11y** with weekStart, yearRange, labels, and aria examples
632
- - **Holiday Provider Integration** with US holidays
633
- - **Single Date Selection** with weekend restrictions
634
- - **Inline Range Picker** with toggle controls
635
- - **Date Range with Time** selection
636
- - **Multiple Date Selection** with action tracking
637
- - **Programmatic Value Setting** for all selection modes
638
- - **Theme Toggle** (Light/Dark mode) with automatic system preference detection
639
- - **Customizable Calendar Views**: Year-picker, decade-picker, timeline view, and time-slider view
640
-
641
- ## **๐Ÿ”ง Development**
642
-
643
- ### **GitHub Actions**
644
-
645
- The project uses GitHub Actions for automated deployment:
646
-
647
- - **Deploy Demo App**: Automatically deploys the demo application to GitHub Pages on pushes to `main`/`master` branches
648
- - Workflow: `.github/workflows/deploy-demo.yml`
649
- - Triggers: Push to main/master or manual workflow dispatch
650
- - Builds and deploys the demo app to GitHub Pages
651
-
652
- ### **Building the Library**
653
-
654
- ```bash
655
- # Build the library (development)
656
- npm run build
657
-
658
- # Build optimized production version
659
- # - Removes source maps automatically
660
- # - Optimized TypeScript compilation
661
- # - Enhanced tree-shaking
662
- npm run build:optimized
663
-
664
- # Analyze bundle size (excludes source maps)
665
- npm run build:analyze
666
- ```
667
-
668
- **Build Output:**
669
- - Main bundle: `dist/ngxsmk-datepicker/fesm2022/ngxsmk-datepicker.mjs` (~127KB)
670
- - Type definitions: `dist/ngxsmk-datepicker/index.d.ts`
671
- - Source maps: Automatically removed from production builds
672
-
673
- ### **Running Tests**
674
-
675
- ```bash
676
- # Run all tests (library + demo app)
677
- npm test
678
-
679
- # Run library tests only
680
- npx ng test ngxsmk-datepicker --no-watch --browsers=ChromeHeadless
681
-
682
- # Run specific test file
683
- npx ng test ngxsmk-datepicker --include="**/issue-13.spec.ts"
684
-
685
- # Run tests in watch mode
686
- npm test -- --watch
687
- ```
688
-
689
- ### **Code Quality Improvements**
690
-
691
- The library now includes:
692
- - โœ… **TypeScript Strict Mode**: Enhanced type safety
693
- - โœ… **ESLint Configuration**: Code quality enforcement
694
- - โœ… **Performance Monitoring**: Built-in performance metrics
695
- - โœ… **Memory Leak Prevention**: Cache size limits and cleanup
696
- - โœ… **Accessibility Testing**: WCAG compliance checks
697
- - โœ… **Mobile Testing**: Touch interaction validation
698
-
699
- ## **๐Ÿ“ฆ Package Structure**
700
-
701
- ```
702
- ngxsmk-datepicker/
703
- โ”œโ”€โ”€ projects/
704
- โ”‚ โ”œโ”€โ”€ ngxsmk-datepicker/ # Main library
705
- โ”‚ โ””โ”€โ”€ demo-app/ # Demo application
706
- โ”œโ”€โ”€ dist/ # Built packages
707
- โ”œโ”€โ”€ docs/ # Documentation
708
- โ””โ”€โ”€ scripts/ # Build scripts
709
- ```
710
-
711
- ## **๐ŸŽฏ Browser Support**
712
-
713
- - **Chrome** 90+
714
- - **Firefox** 88+
715
- - **Safari** 14+
716
- - **Edge** 90+
717
- - **Mobile Safari** 14+
718
- - **Chrome Mobile** 90+
719
-
720
- ## **๐Ÿ—บ๏ธ Roadmap**
721
-
722
- Check out our [Roadmap](ROADMAP.md) to see planned features, improvements, and how you can contribute. We're always looking for contributors, especially for issues labeled `good-first-issue` and `help-wanted`!
723
-
724
- ## **๐Ÿค Contributions**
725
-
726
- We welcome and appreciate contributions from the community! Whether it's reporting a bug, suggesting a new feature, or submitting code, your help is valuable.
727
-
728
- ### **Development Setup**
729
-
730
- 1. **Fork the repository** on GitHub
731
- 2. **Clone your fork** to your local machine
732
- 3. **Install dependencies**: `npm install`
733
- 4. **Run the demo app**: `npm start`
734
- 5. **Create a feature branch** for your changes
735
- 6. **Commit your changes** following conventional commits
736
- 7. **Submit a Pull Request** to the main branch
737
-
738
- ### **Contribution Guidelines**
739
-
740
- - Follow the existing code style
741
- - Add tests for new features
742
- - Update documentation as needed
743
- - Ensure all tests pass
744
- - Follow conventional commit messages
745
-
746
- ## **๐Ÿ“„ Changelog**
747
-
748
- ### **v1.9.21** (Stable)
749
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.21
750
- - โœ… **Stable Release**: Version 1.9.21 is the current stable version
751
- - ๐Ÿ“ฑ **Mobile-Specific Features**: Comprehensive mobile optimization
752
- - Native date picker integration with automatic mobile detection
753
- - Bottom sheet modal with swipe-to-dismiss gestures
754
- - Enhanced touch gestures (double-tap, swipe navigation)
755
- - Haptic feedback support for better mobile UX
756
- - Mobile-optimized animations and keyboard handling
757
- - ๐ŸŽฏ **Advanced Selection Modes**: Extended selection capabilities
758
- - Week selection mode for selecting entire weeks
759
- - Month selection mode for selecting full months
760
- - Quarter selection mode for quarterly selections
761
- - Year selection mode for annual date ranges
762
- - โฑ๏ธ **Enhanced Time Selection**: Improved time picker
763
- - Seconds selection with configurable intervals
764
- - Better time picker UX and controls
765
- - ๐Ÿ—๏ธ **Code Refactoring**: Improved architecture
766
- - New services: CalendarGenerationService, DisplayFormattingService, DateValidationService
767
- - Better code organization and maintainability
768
- - Reduced component complexity
769
- - ๐Ÿงช **E2E Testing**: Comprehensive end-to-end testing
770
- - Playwright setup with multi-browser support
771
- - Mobile viewport testing
772
- - Automated test execution
773
- - โ™ฟ **Accessibility Enhancements**: Better screen reader support
774
- - Improved ARIA live regions
775
- - Enhanced focus management
776
- - Better keyboard navigation
777
- - โšก **Performance Optimizations**: Infrastructure improvements
778
- - Lazy loading calendar months with intelligent caching
779
- - Virtual scrolling infrastructure
780
- - Preloading adjacent months
781
- - ๐Ÿงช **Test Coverage**: Comprehensive test suite
782
- - 414 tests passing
783
- - New service tests
784
- - Updated component and utility tests
785
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.20
786
-
787
- ### **v1.9.19** (Stable)
788
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.19
789
- - โœ… **Stable Release**: Version 1.9.19 is the current stable version
790
- - ๐ŸŽจ **Responsive Layout Redesign**: Complete redesign of demo project layout for all screen sizes (320px to desktop)
791
- - ๐Ÿ“ฑ **Mobile Optimization**: Enhanced mobile experience with improved navbar, sidebar, hero section, and feature grid
792
- - ๐Ÿงน **Code Cleanup**: Removed unnecessary comments for cleaner codebase
793
- - ๐Ÿ”ง **Meta Tag Update**: Replaced deprecated `apple-mobile-web-app-capable` with `mobile-web-app-capable`
794
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.18
795
-
796
- ### **v1.9.18** (Stable)
797
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.18
798
- - โœ… **Stable Release**: Version 1.9.18 is the current stable version
799
- - ๐Ÿ› **Fixed**: Improved mobile touch event handling - touch listeners now properly attach when calendar opens
800
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.17
801
-
802
- ### **v1.9.17** (Stable)
803
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.17
804
- - โœ… **Stable Release**: Version 1.9.17 is the current stable version
805
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.16
806
- - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
807
-
808
- ### **v1.9.16** (Stable)
809
- - ๐Ÿ› **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 }`
810
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.16
811
- - โœ… **Stable Release**: Version 1.9.16 is the current stable version
812
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.15
813
- - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
814
-
815
- ### **v1.9.15** (Stable)
816
- - ๐Ÿ› **Moment Object Binding Fix**: Fixed Moment.js objects not binding correctly with ngModel
817
- - ๐Ÿ› **Date Clicks After Navigation**: Fixed dates becoming unclickable after month navigation
818
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.15
819
- - โœ… **Stable Release**: Version 1.9.15 is the current stable version
820
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.14
821
- - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
822
-
823
- ### **v1.9.14** (Stable)
824
- - ๐Ÿ› **Date Picker Selection Fix**: Fixed date picker selection issues, especially in range mode
825
- - ๐Ÿ› **Moment.js Timezone Support**: Fixed timezone offset preservation for Moment.js objects
826
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.14
827
- - โœ… **Stable Release**: Version 1.9.14 is the current stable version
828
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.13
829
-
830
- ### **v1.9.13** (Stable)
831
- - ๐Ÿ› **Bug Fixes**: Fixed `valueChange` event emitting null for range mode with ngModel
832
- - ๐Ÿ› **Bug Fixes**: Fixed date selection becoming disabled after month navigation in range mode
833
- - ๐Ÿ› **Bug Fixes**: Fixed Moment.js object handling in range values and arrays
834
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.13
835
- - โœ… **Stable Release**: Version 1.9.13 is the current stable version
836
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.12
837
-
838
- ### **v1.9.12** (Stable)
839
- - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.12
840
- - โœ… **Stable Release**: Version 1.9.12 is the current stable version
841
- - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.11
842
- - ๐Ÿ“š **Migration Guide**: See [MIGRATION.md](../../MIGRATION.md) for detailed migration instructions
843
-
844
- ### **v1.9.11** (Stable)
845
- - ๐Ÿ› **Moment.js Integration**: Fixed critical issue where Moment.js objects with custom date formats would not populate correctly
846
- - Added `isMomentObject()` helper method to safely detect Moment.js instances
847
- - Enhanced `_normalizeValue()` method to handle Moment.js objects directly
848
- - Improved `parseCustomDateString()` method for TypeScript compatibility
849
- - Added comprehensive support for format tokens: YYYY, YY, MM, M, DD, D, hh, h, HH, H, mm, m, ss, s, a, A
850
- - Maintains full backward compatibility with Date objects, strings, and all other supported formats
851
- - ๐ŸŽจ **Custom Format Parser**: Enhanced format token parsing with better TypeScript compatibility
852
- - ๐Ÿ” **Moment.js Detection**: More robust detection of Moment.js objects across different versions
853
- - ๐ŸŽฎ **Demo Application**: Added working Moment.js integration example with interactive controls
854
-
855
- ### **v1.9.10** (Stable)
856
- - ๐Ÿ› **Async Database Value Loading**: Enhanced datepicker to properly handle database values that load asynchronously
857
- - Added fallback sync mechanism in `ngAfterViewInit` to catch async database loads
858
- - Added delayed sync checks in `ngOnInit`, `ngOnChanges`, and `ngAfterViewInit`
859
- - Added sync on calendar open, focus events, and touch events
860
- - Extended interval sync duration to 30 seconds with 100ms check intervals
861
- - ๐Ÿ”ง **TypeScript Compilation Error**: Fixed `EffectRef` type error when using Angular 17+ `effect()` API
862
- - Changed `_fieldEffectDestroy: (() => void) | null` to `_fieldEffectRef: EffectRef | null`
863
- - Updated effect cleanup to use `effectRef.destroy()` instead of function call
864
- - Added proper `EffectRef` import from `@angular/core`
865
- - ๐Ÿงช **Test Configuration**: Fixed test configuration for Angular 17+ compatibility
866
- - Updated karma configuration to work with `@angular/build:karma` builder
867
- - Simplified karma.conf.js to remove deprecated plugins
868
- - Updated test script to target correct project
869
-
870
- ### **v1.9.9** (Stable)
871
- - ๐Ÿ› **Database Value Population**: Fixed critical issue where datepicker would not populate with values from database when using `[field]` input binding
872
- - Added `_normalizeValue()` helper method to properly handle all value types
873
- - Updated field effect and related methods to use `_normalizeValue()` instead of `_normalizeDate()`
874
- - Fixed issue where string dates from database were not being parsed and displayed correctly
875
- - Now properly handles Date objects, string dates, range objects, and arrays of dates
876
-
877
- ### **v1.9.8** (Stable)
878
- - ๐Ÿ› **Date Selection Reset Issue**: Fixed critical bug where selected dates would reset to today's date when using `[field]` input binding
879
- - Fixed `applyCurrentTime` to create a new Date object instead of mutating the original
880
- - Added `_isUpdatingFromInternal` flag to prevent field effect from resetting the value
881
- - This ensures selected dates are properly stored in the form field
882
-
883
- ### **v1.9.7** (Stable)
884
- - ๐Ÿ› **Calendar Population**: Fixed critical issue where datepicker calendar would not populate with dates when opened
885
- - Fixed issue when multiple datepickers were present in the same form
886
- - Ensured `generateCalendar()` is called when opening the datepicker via click, touch, or programmatic methods
887
-
888
- ### **v1.9.6** (Stable)
889
- - ๐Ÿ› **Multiple Datepicker Management**: Fixed issue where multiple datepickers in the same form would open in the same centered location
890
- - ๐Ÿ–ฑ๏ธ **Outside Click Detection**: Improved click detection to properly close datepicker when clicking outside
891
- - ๐Ÿ”„ **Auto-close Other Datepickers**: When opening a datepicker, all other open datepickers in the same form are now automatically closed
892
- - ๐Ÿ“ฑ **Mobile Datepicker Opening**: Fixed issue where datepicker modal would not open on mobile screens
893
- - ๐Ÿ“ฑ **Datepicker Closing on Mobile**: Fixed issue where datepicker would open and immediately disappear on mobile devices
894
- - ๐Ÿ‘† **Select Box Cursor**: Added pointer cursor to all select boxes (month, year, hour, minute, AM/PM) in the datepicker
895
-
896
- ### **v1.9.5** (Stable)
897
- - ๐Ÿ”ง **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
898
- - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
899
- - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
900
- - Maintains backward compatibility with Angular 17-20 where field input is optional
901
- - Resolves [#33](https://github.com/NGXSMK/ngxsmk-datepicker/issues/33)
902
-
903
- ### **v1.9.4** (Stable)
904
- - โœจ **Custom Date Format**: New `[displayFormat]` input property to display dates in custom formats
905
- - Supports format strings like "MM/DD/YYYY hh:mm A"
906
- - Works with date adapters (date-fns, dayjs, luxon) or built-in simple formatter
907
- - Supports common format tokens: YYYY, MM, DD, hh, mm, A, etc.
908
- - Resolves [#31](https://github.com/NGXSMK/ngxsmk-datepicker/issues/31)
909
- - ๐Ÿ› **Time Selection Dropdowns**: Fixed visibility issues with time selection dropdowns
910
- - Dropdowns now properly display and are not clipped by parent containers
911
- - Improved z-index handling for time selection dropdowns
912
- - Removed unnecessary scrollbars from datepicker wrapper
913
- - Resolves [#32](https://github.com/NGXSMK/ngxsmk-datepicker/issues/32)
914
-
915
- ### **v1.9.3** (Stable)
916
- - โœจ **Time-Only Picker**: New `[timeOnly]` input property to display only time selection without calendar
917
- - Hides calendar grid and shows only time controls (hour, minute, AM/PM)
918
- - Automatically enables `showTime` when `timeOnly` is true
919
- - Perfect for time selection scenarios where date is not needed
920
- - Value is still a Date object using today's date with selected time
921
- - Placeholder automatically changes to "Select Time" in time-only mode
922
- - Resolves [#29](https://github.com/NGXSMK/ngxsmk-datepicker/issues/29)
923
- - ๐ŸŽจ **Modern Demo App UI**: Complete redesign of the demo application
924
- - Modern navbar with glassmorphism effects, search functionality, and improved theme toggle
925
- - Redesigned sidebar with gradient backgrounds, smooth animations, and visual indicators
926
- - Enhanced icon sizes and better visual hierarchy
927
- - Improved responsive design with better mobile experience
928
- - Automatic system theme detection (dark/light mode preference)
929
- - Gradient accents, shadows, and modern design patterns throughout
930
- - ๐Ÿงช **Test Suite**: Fixed 25+ failing tests across multiple test files
931
- - Fixed date utils tests, calendar utils tests, timezone utils tests, edge cases tests
932
- - Fixed adapters tests, performance utils tests, RTL tests, touch gestures tests
933
- - Fixed calendar views tests, recurring dates utils tests
934
- - All 353 tests now pass successfully
935
-
936
- ### **v1.9.2** (Stable)
937
- - ๐Ÿ“ฆ **Bundle Optimization**: Optimized bundle size with improved TypeScript compiler settings
938
- - Main bundle: ~127KB (source maps excluded from published package)
939
- - Enhanced tree-shaking with optimized imports and compiler options
940
- - Added `importsNotUsedAsValues: "remove"` for smaller output
941
- - Disabled `preserveConstEnums` for better inlining
942
- - ๐Ÿ”ง **Build Process**:
943
- - Source maps automatically removed from production builds (saves ~127KB)
944
- - Improved build scripts with better error handling
945
- - Enhanced bundle analysis that excludes source maps
946
- - ๐Ÿ“ฆ **Package Configuration**:
947
- - Fixed package.json exports to eliminate build warnings
948
- - Optimized `files` array to exclude unnecessary files
949
- - Updated exports field for better module resolution
950
- - ๐Ÿงช **Test Configuration**:
951
- - Added Zone.js polyfills to library test configuration
952
- - Updated test commands to explicitly target library project
953
- - Improved test reliability across Angular versions
954
- - ๐Ÿ› **Bug Fixes**:
955
- - Test suite configuration - added missing Zone.js polyfills for library tests
956
- - Bundle analysis now correctly excludes source maps from size calculations
957
- - Build warnings from conflicting export conditions resolved
958
- - Source map removal script made more resilient for build environments
959
-
960
- ### **v1.9.1** (Stable)
961
- - ๐Ÿ› Minor bug fixes and improvements
962
-
963
- ### **v1.9.0**
964
- - โœจ **Extension Points & Hooks**: system for customization
965
- - โŒจ๏ธ **Enhanced Keyboard Shortcuts**: Y, N, W keys with custom shortcut support
966
- - ๐ŸŽจ **Modern UI/UX**: Improved animations and responsiveness
967
- - ๐Ÿ“š **API Documentation**: TypeDoc integration
968
- - ๐Ÿค– **Semantic Release**: Automated versioning and publishing
969
- - ๐Ÿš€ **Animation Performance**: Optimizations with GPU acceleration
970
- - ๐Ÿ” **Global Search**: Functionality in documentation
971
- - ๐Ÿ“ฑ **Mobile Playground**: For responsive testing
972
-
973
- ### **v1.7.0**
974
- - ๐ŸŽฏ **Signal Forms Support**: Full Angular 21 signal forms integration with writable signals
975
- - ๐ŸŽจ **Tailwind Theming**: Added `classes` input for Tailwind CSS and custom class-based theming
976
- - ๐ŸŒ **Localization Improvements**: Added `weekStart` input to override locale-based week start day
977
- - ๐Ÿ“… **Year Range Configuration**: Added `yearRange` input to customize year dropdown range
978
- - โ™ฟ **Accessibility Enhancements**: Added customizable aria labels for all interactive elements
979
- - ๐Ÿท๏ธ **Custom Labels**: Added `clearLabel` and `closeLabel` inputs for button customization
980
- - ๐Ÿงช **Comprehensive Test Suite**: Added 56 tests covering all features and edge cases
981
- - ๐Ÿ› **Bug Fixes**: Fixed programmatic value setting and Angular 21 compatibility tests
982
- - ๐Ÿงน **Code Cleanup**: Removed unnecessary files, folders, and comments from codebase
983
- - ๐Ÿ“ **Test Improvements**: Enhanced test coverage with comprehensive feature tests
984
- - ๐Ÿ”ง **Test Fixes**: Fixed disabled date tests and integration test issues
985
- - ๐ŸŽฏ **Code Quality**: Improved code maintainability by removing redundant comments
986
-
987
- ### **v1.6.0**
988
- - ๐ŸŽฏ **Programmatic Value Setting**: Added `value` input property to set datepicker value programmatically, perfect for server-side API data integration
989
- - ๐ŸŽจ **Enhanced Demo App**: Completely redesigned demo application with TokiForge-inspired modern UI and API documentation style
990
- - ๐Ÿš€ **GitHub Pages Deployment**: Added automated GitHub Pages deployment with GitHub Actions workflow
991
- - ๐Ÿ“š **Improved Documentation**: Enhanced demo app with comprehensive examples, code snippets, and interactive documentation
992
- - ๐Ÿ”ง **Build Optimizations**: Updated CSS budget limits and improved build configuration
993
- - ๐ŸŽจ **Modern UI Design**: Beautiful gradient themes, glass-morphism effects, and improved visual hierarchy
994
- - ๐Ÿ“ฑ **Better UX**: Enhanced navigation, code copying functionality, and responsive design
995
- - ๐Ÿ› ๏ธ **Developer Experience**: Improved build scripts and deployment automation
996
-
997
- ### **v1.5.0**
998
- - ๐Ÿš€ **Angular 21 Support**: Full compatibility with Angular 21 RC versions
999
- - โšก **Zone-less Support**: Works without zone.js for improved performance
1000
- - ๐Ÿงช **Comprehensive Tests**: Added extensive test suite covering all features
1001
- - ๐Ÿ”ง **Angular 17-21 Compatibility**: Supports Angular versions 17, 18, 19, 20, and 21
1002
- - ๐Ÿ“ฆ **Dependency Updates**: Updated to Angular 21 RC and latest build tools
1003
- - ๐Ÿงน **Code Cleanup**: Removed unnecessary documentation files and comments
1004
- - ๐Ÿ“ **Improved Keywords**: Added version-specific keywords for better discoverability
1005
- - ๐ŸŽฏ **Peer Dependencies**: Updated to support Angular 17-21 range
1006
-
1007
- ### **v1.4.16**
1008
- - ๐Ÿ“š **Documentation**: Comprehensive README updates with latest features and improvements
1009
- - ๐ŸŽฏ **Version Management**: Updated version references across all package files
1010
- - ๐Ÿ“– **User Experience**: Enhanced documentation with better examples and API references
1011
- - ๐Ÿ”ง **Maintenance**: Improved project structure and documentation consistency
1012
- - ๐Ÿ“ฆ **Package Updates**: Synchronized version numbers across all package.json files
1013
- - ๐ŸŽจ **Documentation**: Added detailed bug fixes and performance metrics
1014
- - ๐Ÿš€ **Developer Experience**: Better setup instructions and contribution guidelines
1015
-
1016
- ### **v1.4.15**
1017
- - ๐Ÿ› **Bug Fixes**: Fixed 10 critical bugs including change detection issues and date comparison errors
1018
- - โšก **Performance**: Enhanced OnPush change detection with proper triggers
1019
- - ๐ŸŽฏ **Memory Management**: Added cache size limits to prevent memory leaks
1020
- - ๐Ÿ”ง **Type Safety**: Improved TypeScript types and null safety
1021
- - ๐Ÿ“ฑ **Mobile Optimization**: Enhanced mobile responsive design with touch-friendly interactions
1022
- - ๐ŸŽจ **UI Improvements**: Better visual feedback and accessibility
1023
- - ๐Ÿš€ **Build Optimization**: Improved build configuration and tree-shaking
1024
- - ๐Ÿงน **Code Quality**: Enhanced code maintainability and performance
1025
-
1026
- ### **v1.4.13**
1027
- - ๐Ÿšซ **Disabled Dates**: New `disabledDates` input property to disable specific dates
1028
- - ๐ŸŽฏ **Date String Support**: Supports both string dates (MM/DD/YYYY) and Date objects
1029
- - ๐Ÿ’ก **Holiday Tooltips**: Hover over holiday dates to see holiday names as tooltips
1030
- - ๐ŸŽจ **Enhanced UX**: Better visual feedback for disabled dates
1031
- - ๐Ÿ“ฆ **Improved API**: More flexible date disabling options
1032
-
1033
- ### **v1.4.12**
1034
- - โšก **Instant Navigation**: Removed all animations for lightning-fast arrow navigation
1035
- - ๐Ÿšซ **Smart Back Arrow**: Automatically disables back arrow when minDate is set
1036
- - ๐ŸŽฏ **Better UX**: Prevents navigation to invalid date ranges
1037
- - ๐Ÿ—“๏ธ **Previous Month Days**: Now shows last few days of previous month for better context
1038
- - ๐ŸŽจ **Enhanced Styling**: Improved visual hierarchy with better day cell sizing
1039
- - ๐Ÿ–ฑ๏ธ **Interactive Previous Days**: Previous month days are now selectable and interactive
1040
- - ๐Ÿงน **Code Optimization**: Cleaner, more maintainable codebase
1041
- - ๐Ÿ“ฆ **Smaller Bundle**: Reduced CSS and JavaScript footprint
1042
-
1043
- ### **v1.4.11**
1044
- - ๐ŸŽจ **UI Improvements**: Enhanced day cell sizing and visual hierarchy
1045
- - ๐Ÿ–ฑ๏ธ **Better Interactions**: Improved click and hover states for previous month days
1046
-
1047
- ### **v1.4.10**
1048
- - ๐Ÿ—“๏ธ **Previous Month Display**: Added last few days of previous month for better context
1049
- - ๐ŸŽฏ **Smart Selection**: Previous month days are now selectable and interactive
1050
-
1051
- ### **v1.4.9**
1052
- - ๐Ÿšซ **Range Fix**: Fixed range highlighting on empty/previous month days
1053
- - ๐ŸŽจ **Styling Updates**: Improved visual consistency across all day types
1054
-
1055
- ### **v1.4.8**
1056
- - โšก **Performance**: Optimized calendar generation and rendering
1057
- - ๐Ÿงน **Code Cleanup**: Removed unused animation code and improved maintainability
1058
-
1059
- ### **v1.4.6**
1060
- - ๐Ÿ”ง **Fixed Import Paths**: Corrected package exports for proper module resolution
1061
- - ๐Ÿ“ฆ **Better Package Structure**: Improved npm package configuration
1062
-
1063
- ### **v1.4.5**
1064
- - ๐Ÿ› Bug fixes and stability improvements
1065
- - ๐Ÿ”ง Enhanced error handling
1066
- - ๐Ÿ“ฑ Improved mobile responsiveness
1067
- - ๐ŸŽจ Minor UI/UX improvements
1068
-
1069
- ### **v1.4.0**
1070
- - โœ… Performance optimizations (30% smaller bundle)
1071
- - โœ… OnPush change detection strategy
1072
- - โœ… Memoized date comparisons
1073
- - โœ… Tree-shakable architecture
1074
- - โœ… Enhanced TypeScript support
1075
- - โœ… Improved accessibility
1076
- - โœ… Better mobile responsiveness
1077
-
1078
- ### **Previous Versions**
1079
- - v1.3.5: Initial release with core features
1080
- - v1.3.4: Bug fixes and improvements
1081
- - v1.3.3: Holiday provider integration
1082
-
1083
- ## **๐ŸŽจ Theming with TokiForge**
1084
-
1085
- Looking for a powerful theming solution for your Angular application? Check out **[TokiForge](https://tokiforge.github.io/tokiforge/)** โ€” an open-source modern design token & theme engine that provides runtime theme switching for React, Vue, Svelte, Angular, and any framework.
1086
-
1087
- ### Why TokiForge?
1088
-
1089
- - โœ… **Framework-agnostic** โ€” Works with Angular, React, Vue, Svelte, and vanilla JS
1090
- - โœ… **Runtime theme switching** โ€” Change themes dynamically without rebuilds
1091
- - โœ… **Type-safe** โ€” Full TypeScript support for design tokens
1092
- - โœ… **Lightweight** โ€” <3 KB gzipped runtime footprint
1093
- - โœ… **CSS custom properties** โ€” Zero JS overhead in static mode
1094
- - โœ… **SSR compatible** โ€” Works seamlessly with Angular Universal
1095
-
1096
- Perfect for managing design tokens, creating theme systems, and implementing dark mode in your Angular applications!
1097
-
1098
- **๐Ÿ‘‰ [Learn more about TokiForge โ†’](https://tokiforge.github.io/tokiforge/)**
1099
-
1100
- ---
1101
-
1102
- ## **๐Ÿ“œ License**
1103
-
1104
- MIT License - see [LICENSE](LICENSE) file for details.
1105
-
1106
- ## **๐Ÿ” SEO & Discoverability**
1107
-
1108
- This library is optimized for search engine visibility:
1109
- - **Keywords**: Angular datepicker, date range picker, calendar component, Angular 17-21, TypeScript, Signal Forms, SSR compatible
1110
- - **Meta Tags**: Comprehensive Open Graph and Twitter Card support
1111
- - **Structured Data**: JSON-LD schema markup for better search results
1112
- - **Documentation**: Complete API documentation with examples
1113
- - **Performance**: Optimized bundle size (~127KB) for fast loading
1114
-
1115
- ## **๐Ÿ‘จโ€๐Ÿ’ป Author**
1116
-
1117
- **Sachin Dilshan**
1118
- - ๐Ÿ“ง Email: [sachindilshan040@gmail.com](mailto:sachindilshan040@gmail.com)
1119
- - ๐Ÿ™ GitHub: [@toozuuu](https://github.com/toozuuu)
1120
- - ๐Ÿ“ฆ NPM: [ngxsmk-datepicker](https://www.npmjs.com/package/ngxsmk-datepicker)
1121
- - ๐Ÿ’ผ LinkedIn: [sachindilshan](https://www.linkedin.com/in/sachindilshan/)
1122
-
1123
- ## **โญ Support**
1124
-
1125
- If you find this library helpful, please consider:
1126
- - โญ **Starring** the repository
1127
- - ๐Ÿ› **Reporting** bugs and issues
1128
- - ๐Ÿ’ก **Suggesting** new features
1129
- - ๐Ÿค **Contributing** code improvements
1130
- - ๐Ÿ“ข **Sharing** with the community
1
+ # **ngxsmk-datepicker** - Modern Angular Date Picker Component
2
+
3
+ [![npm version](https://img.shields.io/npm/v/ngxsmk-datepicker.svg)](https://www.npmjs.com/package/ngxsmk-datepicker)
4
+ [![Angular](https://img.shields.io/badge/Angular-17%2B-red.svg)](https://angular.io/)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+ [![Bundle Size](https://img.shields.io/badge/bundle-~127KB-green.svg)](https://bundlephobia.com/package/ngxsmk-datepicker)
7
+ [![Downloads](https://img.shields.io/npm/dm/ngxsmk-datepicker.svg)](https://www.npmjs.com/package/ngxsmk-datepicker)
8
+
9
+ **npm i ngxsmk-datepicker**
10
+
11
+ > **Stable Version**: `1.9.22` is the current stable release. For production use, install the latest version from npm.
12
+
13
+ **Latest Version**: Check [npm](https://www.npmjs.com/package/ngxsmk-datepicker) for the most recent release.
14
+
15
+ ngxsmk-datepicker โ€“ A modern, powerful, and fully customizable date and date-range picker component designed for Angular 17+ and Ionic applications. Seamlessly integrates with both frameworks, offering a flexible, mobile-friendly UI and advanced features to enhance date selection experiences in your apps.
16
+
17
+ **SEO Keywords**: Angular datepicker, Angular date range picker, Angular calendar component, Angular 17 datepicker, Angular 18 datepicker, Angular 19 datepicker, Angular 20 datepicker, Angular 21 datepicker, TypeScript datepicker, standalone Angular component, Signal Forms datepicker, SSR compatible datepicker, zoneless Angular datepicker, lightweight datepicker, customizable datepicker, open source datepicker, free Angular datepicker, MIT license datepicker, accessible datepicker, responsive datepicker, mobile datepicker, touch-friendly datepicker, keyboard accessible datepicker, RTL datepicker, internationalized datepicker, i18n datepicker, localized datepicker, holiday calendar, date time picker, time selection, 12 hour clock, 24 hour clock, date validation, min max dates, disabled dates, date presets, recurring dates, timezone support
18
+
19
+ * Github: [https://github.com/NGXSMK/ngxsmk-datepicker](https://github.com/NGXSMK/ngxsmk-datepicker)
20
+ * **GitHub Pages Demo**: [https://ngxsmk.github.io/ngxsmk-datepicker/](https://ngxsmk.github.io/ngxsmk-datepicker/)
21
+
22
+ Built with Angular Signals for optimal performance and a clean, declarative API. The component is standalone and has zero dependencies, making it lightweight and easy to integrate into any project.
23
+
24
+ ## ๐Ÿ“ท Screenshots
25
+
26
+ <p align="left">
27
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/1.png" alt="Angular Single Date Selection" width="420" />
28
+ &nbsp;&nbsp;
29
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/2.png" alt="Angular Date Range Selection" width="420" />
30
+ &nbsp;&nbsp;
31
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/3.png" alt="Angular Date Mobile Screen Playground" width="420" />
32
+ </p>
33
+
34
+ ## **โœจ Features**
35
+
36
+ * **Multiple Selection Modes**: Supports `single`, `range`, `multiple`, `week`, `month`, `quarter`, and `year` date selection.
37
+ * **Inline and Popover Display**: Can be rendered inline or as a popover with automatic mode detection.
38
+ * **Light and Dark Themes**: Includes built-in support for light and dark modes.
39
+ * **Holiday Marking**: Automatically mark and disable holidays using a custom `HolidayProvider`.
40
+ * **Holiday Tooltips**: Hover over holiday dates to see holiday names as tooltips.
41
+ * **Disabled Dates**: Disable specific dates by passing an array of date strings or Date objects.
42
+ * **Date & Time Selection**: Supports optional time inputs with configurable minute and second intervals.
43
+ * **Seconds Selection**: Optional seconds picker with `showSeconds` input and configurable `secondInterval`.
44
+ * **Time-Only Mode**: Display only time picker without calendar using `[timeOnly]="true"`.
45
+ * **12h/24h Time Support**: Uses internal 24-hour timekeeping but displays a user-friendly **12-hour clock with AM/PM toggle**.
46
+ * **Mobile-Native Integration**: Automatic native date picker on mobile devices with `useNativePicker` input.
47
+ * **Mobile Gestures**: Enhanced touch support with double-tap selection, swipe navigation, and haptic feedback.
48
+ * **Mobile Modal Styles**: Bottom sheet, center, and fullscreen modal options for mobile devices.
49
+ * **Predefined Date Ranges**: Offers quick selection of common ranges (e.g., "Last 7 Days").
50
+ * **Advanced Localization (i18n)**: Automatically handles month/weekday names and week start days based on the browser's locale.
51
+ * **Previous Month Context**: Shows last few days of previous month for better date selection context.
52
+ * **Custom Styling**: All component elements are prefixed with `ngxsmk-` and themeable via CSS custom properties.
53
+ * **Zero Dependencies**: The component is standalone and lightweight.
54
+ * **Signal Forms Support**: First-class support for Angular 21+ Signal Forms with `[field]` input (experimental feature).
55
+ * **SSR Compatible**: Fully optimized for server-side rendering with Angular Universal.
56
+ * **Zoneless Support**: Works with or without Zone.js for optimal performance. Compatible with Angular 21's default zoneless setup.
57
+ * **Angular 21 Ready**: Full compatibility with Angular 21 new features including Signal Forms, Vitest, and zoneless by default.
58
+ * **E2E Testing**: Comprehensive Playwright-based end-to-end testing infrastructure.
59
+ * **Performance Optimized**: Lazy loading calendar months, intelligent caching, and virtual scrolling infrastructure.
60
+ * **Plugin Architecture**: Powerful plugin system with hooks for rendering, validation, keyboard shortcuts, formatting, and events. Create reusable plugins and extend functionality without modifying core code.
61
+ * **Enhanced Keyboard Navigation**: Extended keyboard shortcuts (Y for yesterday, N for tomorrow, W for next week) with custom shortcut support.
62
+ * **Modern UI/UX**: Polished design with improved spacing, shadows, animations, and accessibility.
63
+ * **Reduced Motion Support**: Respects `prefers-reduced-motion` for accessibility.
64
+ * **Comprehensive Testing**: Full test coverage with 353+ tests covering keyboard navigation, time handling, SSR, RTL, touch gestures, and edge cases.
65
+ * **CI/CD Integration**: Automated testing and coverage reporting via GitHub Actions.
66
+ * **Customizable Calendar Views**: Year-picker, decade-picker, timeline view, and time-slider view for diverse use cases.
67
+ * **Modern Demo App**: Beautiful demo application with glassmorphism effects, gradient themes, and responsive design.
68
+
69
+ ## **๐Ÿ“‹ Compatibility**
70
+
71
+ For detailed compatibility information, see [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
72
+
73
+ ### Quick Reference
74
+
75
+ | Angular Version | Status | Core Features | Signal Forms | SSR | Zoneless |
76
+ |----------------|--------|---------------|--------------|-----|----------|
77
+ | Angular 17 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
78
+ | Angular 18 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
79
+ | Angular 19 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
80
+ | Angular 20 | โœ… Fully Supported | โœ… All | โŒ | โœ… | โœ… |
81
+ | Angular 21 | โœ… Fully Supported | โœ… All | โœ… | โœ… | โœ… | **Officially Released** |
82
+ | Angular 22+ | ๐Ÿ”„ Future Support | โœ… All | โœ… | โœ… | โœ… |
83
+
84
+ **Zone.js**: Optional - The library works with or without Zone.js (zoneless apps supported)
85
+
86
+ **SSR**: โœ… Fully compatible with Angular Universal and server-side rendering
87
+
88
+ **Peer Dependencies**: `@angular/core >=17.0.0 <24.0.0`
89
+
90
+ ## **๐Ÿš€ Installation**
91
+
92
+ Install the package using npm:
93
+
94
+ npm install ngxsmk-datepicker
95
+
96
+ ## **Usage**
97
+
98
+ ngxsmk-datepicker is a standalone component, so you can import it directly into your component or module.
99
+
100
+ ### Signal Forms (Angular 21)
101
+
102
+ You can bind directly to a writable Signal using standard two-way binding. This works seamlessly alongside traditional Reactive Forms.
103
+
104
+ ```ts
105
+ import { signal } from '@angular/core';
106
+ import { DatepickerValue } from 'ngxsmk-datepicker';
107
+
108
+ export class MyComponent {
109
+ dateSig = signal<DatepickerValue>(null);
110
+ }
111
+ ```
112
+
113
+ ```html
114
+ <ngxsmk-datepicker
115
+ mode="single"
116
+ [value]="dateSig()"
117
+ (valueChange)="dateSig.set($event)">
118
+ </ngxsmk-datepicker>
119
+
120
+ <p>Signal value: {{ dateSig() | json }}</p>
121
+ ```
122
+
123
+ This pattern is also compatible with computed/linked signals produced by `httpResource`, enabling powerful data flows with Angular 21.
124
+
125
+ ### Signal Forms with `[field]` Input (Angular 21+)
126
+
127
+ For direct integration with Angular Signal Forms, use the `[field]` input:
128
+
129
+ ```typescript
130
+ import { Component, signal, form, objectSchema } from '@angular/core';
131
+ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
132
+
133
+ @Component({
134
+ selector: 'app-form',
135
+ standalone: true,
136
+ imports: [NgxsmkDatepickerComponent],
137
+ template: `
138
+ <form>
139
+ <ngxsmk-datepicker
140
+ [field]="myForm.dateInQuestion"
141
+ mode="single"
142
+ placeholder="Select a date">
143
+ </ngxsmk-datepicker>
144
+ </form>
145
+ `
146
+ })
147
+ export class FormComponent {
148
+ localObject = signal({ dateInQuestion: new Date() });
149
+
150
+ myForm = form(this.localObject, objectSchema({
151
+ dateInQuestion: objectSchema<Date>()
152
+ }));
153
+ }
154
+ ```
155
+
156
+ The `[field]` input provides automatic two-way binding with signal forms - no manual event handling needed!
157
+
158
+ ### Documentation
159
+
160
+ - **[Plugin Architecture](./docs/PLUGIN-ARCHITECTURE.md)** - Complete guide to the plugin architecture and hook system
161
+ - **[Signals Integration Guide](./docs/signals.md)** - Complete guide to using signals with the datepicker
162
+ - **[Signal Forms Guide](./docs/signal-forms.md)** - Deep dive into Signal Forms integration
163
+ - **[SSR Guide](./docs/ssr.md)** - Server-side rendering setup and best practices
164
+ - **[SSR Example](./docs/SSR-EXAMPLE.md)** - Complete Angular Universal example with hydration notes
165
+ - **[Extension Points Guide](./docs/extension-points.md)** - Customization hooks and extension points
166
+ - **[Theme Tokens Reference](./docs/THEME-TOKENS.md)** - Complete CSS custom properties reference with examples
167
+ - **[API Documentation](./docs/API.md)** - Complete public API reference
168
+
169
+ #### **1. Import the Component**
170
+
171
+ In your component file (e.g., app.component.ts), import NgxsmkDatepickerComponent.
172
+
173
+ import { Component } from '@angular/core';
174
+ import { NgxsmkDatepickerComponent, DateRange, HolidayProvider } from 'ngxsmk-datepicker';
175
+
176
+ @Component({
177
+ selector: 'app-root',
178
+ standalone: true,
179
+ imports: [NgxsmkDatepickerComponent],
180
+ templateUrl: './app.component.html',
181
+ })
182
+ export class AppComponent {
183
+ // Example for predefined ranges
184
+ public myRanges: DateRange = {
185
+ 'Today': [new Date(), new Date()],
186
+ 'Last 7 Days': [new Date(new Date().setDate(new Date().getDate() - 6)), new Date()],
187
+ 'This Month': [new Date(new Date().getFullYear(), new Date().getMonth(), 1), new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0)],
188
+ };
189
+
190
+ // Example for disabling weekends
191
+ isWeekend = (date: Date): boolean => {
192
+ const day = date.getDay();
193
+ return day === 0 || day === 6; // Sunday or Saturday
194
+ };
195
+
196
+ onDateChange(value: Date | { start: Date; end: Date } | Date[]) {
197
+ console.log('Date changed:', value);
198
+ }
199
+ }
200
+
201
+ #### **2. Add it to Your Template**
202
+
203
+ Use the `<ngxsmk-datepicker>` selector in your HTML template.
204
+
205
+ ```html
206
+ <h2>Advanced Date Range Picker</h2>
207
+
208
+ <ngxsmk-datepicker
209
+ [mode]="'range'"
210
+ [ranges]="myRanges"
211
+ [showTime]="true"
212
+ [minuteInterval]="15"
213
+ [minDate]="today"
214
+ [isInvalidDate]="isWeekend"
215
+ [locale]="'en-US'"
216
+ [theme]="'light'"
217
+ [inline]="'auto'"
218
+ (valueChange)="onDateChange($event)"
219
+ ></ngxsmk-datepicker>
220
+
221
+ #### **3. Disabled Dates Example**
222
+
223
+ Disable specific dates by passing an array of date strings or Date objects:
224
+
225
+ ```typescript
226
+ // In your component
227
+ disabledDates = ['10/21/2025', '08/21/2025', '10/15/2025', '10/8/2025', '10/3/2025'];
228
+
229
+ // In your template
230
+ <ngxsmk-datepicker
231
+ [mode]="'single'"
232
+ [disabledDates]="disabledDates"
233
+ placeholder="Select a date">
234
+ </ngxsmk-datepicker>
235
+ ```
236
+
237
+ #### **4. Holiday Tooltips Example**
238
+
239
+ Holiday dates automatically show tooltips when you hover over them:
240
+
241
+ ```typescript
242
+ // Holiday provider with tooltips
243
+ class MyHolidayProvider implements HolidayProvider {
244
+ private holidays: { [key: string]: string } = {
245
+ '2025-01-01': 'New Year\'s Day',
246
+ '2025-07-04': 'Independence Day',
247
+ '2025-12-25': 'Christmas Day',
248
+ };
249
+
250
+ isHoliday(date: Date): boolean {
251
+ const key = this.formatDateKey(date);
252
+ return !!this.holidays[key];
253
+ }
254
+
255
+ getHolidayLabel(date: Date): string | null {
256
+ const key = this.formatDateKey(date);
257
+ return this.holidays[key] || null;
258
+ }
259
+ }
260
+
261
+ // In your template
262
+ <ngxsmk-datepicker
263
+ [holidayProvider]="holidayProvider"
264
+ [disableHolidays]="false"
265
+ placeholder="Hover over holidays to see tooltips">
266
+ </ngxsmk-datepicker>
267
+ ```
268
+
269
+ ## **๐Ÿ”Œ Framework Integration**
270
+
271
+ ### **Angular Material Form Fields**
272
+
273
+ Integrate with Angular Material's form field components for a seamless Material Design experience. Works with both standalone and non-standalone components:
274
+
275
+ **Standalone Components:**
276
+ ```typescript
277
+ import { Component } from '@angular/core';
278
+ import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
279
+ import { MatFormFieldModule } from '@angular/material/form-field';
280
+ import { MatInputModule } from '@angular/material/input';
281
+ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
282
+
283
+ @Component({
284
+ selector: 'app-material-form',
285
+ standalone: true,
286
+ imports: [
287
+ ReactiveFormsModule,
288
+ MatFormFieldModule,
289
+ MatInputModule,
290
+ NgxsmkDatepickerComponent
291
+ ],
292
+ template: `
293
+ <form [formGroup]="myForm">
294
+ <mat-form-field appearance="outline">
295
+ <mat-label>Select Date</mat-label>
296
+ <ngxsmk-datepicker
297
+ mode="single"
298
+ formControlName="date"
299
+ placeholder="Choose a date">
300
+ </ngxsmk-datepicker>
301
+ </mat-form-field>
302
+ </form>
303
+ `
304
+ })
305
+ export class MaterialFormComponent {
306
+ myForm = new FormGroup({
307
+ date: new FormControl<Date | null>(null)
308
+ });
309
+ }
310
+ ```
311
+
312
+ **Non-Standalone Components (NgModules):**
313
+ ```typescript
314
+ import { NgModule } from '@angular/core';
315
+ import { MAT_FORM_FIELD_CONTROL } from '@angular/material/form-field';
316
+ import { NgxsmkDatepickerComponent, provideMaterialFormFieldControl } from 'ngxsmk-datepicker';
317
+ import { MatFormFieldModule } from '@angular/material/form-field';
318
+ import { MatInputModule } from '@angular/material/input';
319
+ import { ReactiveFormsModule } from '@angular/forms';
320
+
321
+ @NgModule({
322
+ imports: [
323
+ NgxsmkDatepickerComponent,
324
+ MatFormFieldModule,
325
+ MatInputModule,
326
+ ReactiveFormsModule
327
+ ],
328
+ providers: [provideMaterialFormFieldControl(MAT_FORM_FIELD_CONTROL)]
329
+ })
330
+ export class MyModule { }
331
+ ```
332
+
333
+ **With Date Range:**
334
+ ```html
335
+ <mat-form-field appearance="fill">
336
+ <mat-label>Date Range</mat-label>
337
+ <ngxsmk-datepicker
338
+ mode="range"
339
+ [showTime]="true"
340
+ formControlName="dateRange">
341
+ </ngxsmk-datepicker>
342
+ </mat-form-field>
343
+ ```
344
+
345
+ ### **Ionic Components**
346
+
347
+ Works seamlessly with Ionic form components and follows Ionic design patterns:
348
+
349
+ ```typescript
350
+ import { Component } from '@angular/core';
351
+ import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
352
+ import { IonItem, IonLabel, IonInput } from '@ionic/angular/standalone';
353
+ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
354
+
355
+ @Component({
356
+ selector: 'app-ionic-form',
357
+ standalone: true,
358
+ imports: [
359
+ ReactiveFormsModule,
360
+ IonItem,
361
+ IonLabel,
362
+ IonInput,
363
+ NgxsmkDatepickerComponent
364
+ ],
365
+ template: `
366
+ <form [formGroup]="myForm">
367
+ <ion-item>
368
+ <ion-label position="stacked">Appointment Date</ion-label>
369
+ <ngxsmk-datepicker
370
+ mode="single"
371
+ formControlName="appointmentDate"
372
+ placeholder="Select date">
373
+ </ngxsmk-datepicker>
374
+ </ion-item>
375
+ </form>
376
+ `
377
+ })
378
+ export class IonicFormComponent {
379
+ myForm = new FormGroup({
380
+ appointmentDate: new FormControl<Date | null>(null)
381
+ });
382
+ }
383
+ ```
384
+
385
+ **With Ionic Datetime Styling:**
386
+ ```html
387
+ <ion-item>
388
+ <ion-label>Check-in / Check-out</ion-label>
389
+ <ngxsmk-datepicker
390
+ mode="range"
391
+ [theme]="'light'"
392
+ formControlName="bookingDates">
393
+ </ngxsmk-datepicker>
394
+ </ion-item>
395
+ ```
396
+
397
+ ### **Plain HTML Inputs**
398
+
399
+ Use with standard HTML form inputs for maximum flexibility:
400
+
401
+ ```typescript
402
+ import { Component } from '@angular/core';
403
+ import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
404
+ import { NgxsmkDatepickerComponent } from 'ngxsmk-datepicker';
405
+
406
+ @Component({
407
+ selector: 'app-plain-form',
408
+ standalone: true,
409
+ imports: [ReactiveFormsModule, NgxsmkDatepickerComponent],
410
+ template: `
411
+ <form [formGroup]="myForm">
412
+ <label for="birthdate">Birth Date</label>
413
+ <ngxsmk-datepicker
414
+ id="birthdate"
415
+ mode="single"
416
+ formControlName="birthdate"
417
+ placeholder="MM/DD/YYYY">
418
+ </ngxsmk-datepicker>
419
+
420
+ <button type="submit">Submit</button>
421
+ </form>
422
+ `
423
+ })
424
+ export class PlainFormComponent {
425
+ myForm = new FormGroup({
426
+ birthdate: new FormControl<Date | null>(null)
427
+ });
428
+ }
429
+ ```
430
+
431
+ **With Native HTML5 Validation:**
432
+ ```html
433
+ <form [formGroup]="myForm">
434
+ <div class="form-group">
435
+ <label for="event-date">Event Date *</label>
436
+ <ngxsmk-datepicker
437
+ id="event-date"
438
+ mode="single"
439
+ formControlName="eventDate"
440
+ [minDate]="today"
441
+ required>
442
+ </ngxsmk-datepicker>
443
+ </div>
444
+ </form>
445
+ ```
446
+
447
+ ## **โš™๏ธ API Reference**
448
+
449
+ ### **Inputs**
450
+
451
+ | Property | Type | Default | Description |
452
+ |:---------------|:---------------------------------------------------|:----------------------|:--------------------------------------------------------------------------------------------------------------|
453
+ | mode | 'single' \| 'range' \| 'multiple' | 'single' | The selection mode. |
454
+ | inline | boolean \| 'always' \| 'auto' | false | Controls the display mode. `true` or `'always'` for inline, `'auto'` for responsive. |
455
+ | locale | string | navigator.language | Sets the locale for language and regional formatting (e.g., 'en-US', 'de-DE'). |
456
+ | theme | 'light' \| 'dark' | 'light' | The color theme. |
457
+ | showRanges | boolean | true | If true, displays the predefined ranges panel when in 'range' mode. |
458
+ | minDate | DateInput | null | The earliest selectable date. |
459
+ | maxDate | DateInput | null | The latest selectable date. |
460
+ | isInvalidDate | (date: Date) => boolean | () => false | A function to programmatically disable specific dates. |
461
+ | ranges | DateRange | null | An object of predefined date ranges. |
462
+ | minuteInterval | number | 1 | Interval for minute dropdown options. |
463
+ | showTime | boolean | false | Enables the hour/minute/AM/PM selection section. |
464
+ | timeOnly | boolean | false | Display time picker only (no calendar). Automatically enables `showTime`. Perfect for time selection scenarios. |
465
+ | value | DatepickerValue | null | Programmatic value setting. Set the datepicker value from code (useful for server-side API data). |
466
+ | startAt | DateInput | null | The date to initially center the calendar view on. |
467
+ | holidayProvider| HolidayProvider | null | An object that provides holiday information. |
468
+ | disableHolidays| boolean | false | If true, disables holiday dates from being selected. |
469
+ | disabledDates | (string \| Date)[] | [] | Array of dates to disable. Supports both string dates (MM/DD/YYYY) and Date objects. |
470
+ | weekStart | number \| null | null | Override week start day (0=Sunday, 1=Monday, etc.). If null, uses locale-based week start. |
471
+ | yearRange | number | 10 | Number of years before/after current year to show in year dropdown. |
472
+ | clearLabel | string | 'Clear' | Custom label for the clear button. |
473
+ | closeLabel | string | 'Close' | Custom label for the close button. |
474
+ | prevMonthAriaLabel | string | 'Previous month' | Aria label for previous month navigation button. |
475
+ | nextMonthAriaLabel | string | 'Next month' | Aria label for next month navigation button. |
476
+ | clearAriaLabel | string | 'Clear selection' | Aria label for clear button. |
477
+ | closeAriaLabel | string | 'Close calendar' | Aria label for close button. |
478
+ | classes | { wrapper?, inputGroup?, input?, popover?, container?, calendar?, header?, navPrev?, navNext?, dayCell?, footer?, clearBtn?, closeBtn? } | undefined | Tailwind-friendly class overrides for theming. |
479
+
480
+ ### **Outputs**
481
+
482
+ | Event | Payload | Description |
483
+ |:------------|:---------------------------------------------------|:-----------------------------------------------------------------|
484
+ | valueChange | DatepickerValue | Emits the newly selected date, range, or array of dates. |
485
+ | action | { type: string; payload?: any } | Emits various events like `dateSelected`, `timeChanged`, etc. |
486
+
487
+ ## **๐ŸŽจ Theming**
488
+
489
+ ### CSS Variables
490
+
491
+ You can easily customize the colors of the datepicker by overriding the CSS custom properties in your own stylesheet.
492
+
493
+ ```css
494
+ ngxsmk-datepicker {
495
+ --datepicker-primary-color: #d9267d;
496
+ --datepicker-primary-contrast: #ffffff;
497
+ --datepicker-range-background: #fce7f3;
498
+ }
499
+ ```
500
+
501
+ ### Tailwind/ngClass Support
502
+
503
+ For Tailwind CSS or custom class-based theming, use the `classes` input:
504
+
505
+ ```html
506
+ <ngxsmk-datepicker
507
+ mode="single"
508
+ [classes]="{
509
+ inputGroup: 'rounded-lg border',
510
+ input: 'px-3 py-2 text-sm',
511
+ popover: 'shadow-2xl',
512
+ dayCell: 'hover:bg-indigo-50',
513
+ footer: 'flex justify-end gap-2',
514
+ clearBtn: 'btn btn-ghost',
515
+ closeBtn: 'btn btn-primary'
516
+ }">
517
+ </ngxsmk-datepicker>
518
+ ```
519
+
520
+ ### Dark Theme
521
+
522
+ To enable the dark theme, simply bind the theme input:
523
+
524
+ ```html
525
+ <ngxsmk-datepicker [theme]="'dark'"></ngxsmk-datepicker>
526
+ ```
527
+
528
+ ## **๐ŸŒ Localization**
529
+
530
+ The `locale` input controls all internationalization. It automatically formats month names, weekday names, and sets the first day of the week.
531
+
532
+ ```html
533
+ <ngxsmk-datepicker [locale]="'de-DE'"></ngxsmk-datepicker>
534
+
535
+ <ngxsmk-datepicker [locale]="'fr-FR'"></ngxsmk-datepicker>
536
+ ```
537
+
538
+ The datepicker automatically detects the browser's locale if not specified. For SSR applications, explicitly set the locale to ensure consistent rendering on both server and client.
539
+
540
+ ## **๐Ÿ–ฅ๏ธ Server-Side Rendering (SSR)**
541
+
542
+ The datepicker is fully compatible with Angular Universal and server-side rendering:
543
+
544
+ - โœ… All browser APIs are platform-checked
545
+ - โœ… No `window` or `document` access during initialization
546
+ - โœ… Works with partial hydration
547
+ - โœ… Compatible with zoneless applications
548
+
549
+ See the [SSR Guide](./projects/ngxsmk-datepicker/docs/ssr.md) for detailed setup instructions.
550
+
551
+ ## **โŒจ๏ธ Keyboard Navigation**
552
+
553
+ The datepicker supports full keyboard navigation for accessibility:
554
+
555
+ ### Built-in Shortcuts
556
+
557
+ - **Arrow Keys** (โ† โ†’ โ†‘ โ†“): Navigate between dates
558
+ - **Page Up/Down**: Navigate months (Shift + Page Up/Down for years)
559
+ - **Home/End**: Jump to first/last day of month
560
+ - **Enter/Space**: Select focused date
561
+ - **Escape**: Close calendar (popover mode)
562
+ - **T**: Select today's date
563
+ - **Y**: Select yesterday
564
+ - **N**: Select tomorrow
565
+ - **W**: Select next week (7 days from today)
566
+ - **Tab**: Navigate between interactive elements
567
+
568
+ ### Custom Keyboard Shortcuts
569
+
570
+ You can add custom keyboard shortcuts using the `hooks` input or `customShortcuts` input:
571
+
572
+ ```typescript
573
+ import { DatepickerHooks, KeyboardShortcutContext } from 'ngxsmk-datepicker';
574
+
575
+ const myHooks: DatepickerHooks = {
576
+ handleShortcut: (event, context) => {
577
+ if (event.ctrlKey && event.key === '1') {
578
+ // Custom action
579
+ return true; // Handled
580
+ }
581
+ return false; // Use default
582
+ }
583
+ };
584
+ ```
585
+
586
+ ```html
587
+ <ngxsmk-datepicker
588
+ [hooks]="myHooks"
589
+ [customShortcuts]="shortcuts"
590
+ mode="single">
591
+ </ngxsmk-datepicker>
592
+ ```
593
+
594
+ All date cells are keyboard accessible with proper ARIA attributes for screen readers.
595
+
596
+ See [Extension Points Guide](./projects/ngxsmk-datepicker/docs/extension-points.md) for detailed customization options.
597
+
598
+ ## **๐Ÿš€ Performance Optimizations**
599
+
600
+ This library has been optimized for maximum performance:
601
+
602
+ * **30% Smaller Bundle**: Optimized build configuration and tree-shaking
603
+ * **40% Faster Rendering**: OnPush change detection strategy with proper triggers
604
+ * **60% Faster Selection**: Memoized date comparisons and debounced operations
605
+ * **Zero Dependencies**: Standalone component with no external dependencies
606
+ * **Tree-shakable**: Only import what you need
607
+ * **Memory Efficient**: Cache size limits prevent memory leaks
608
+ * **Hardware Accelerated**: CSS optimizations for smooth animations
609
+ * **Mobile Optimized**: Touch-friendly interactions and responsive design
610
+
611
+ ## **๐Ÿ› Bug Fixes & Improvements**
612
+
613
+ ### **Critical Bug Fixes in v1.4.15:**
614
+ - โœ… **Change Detection**: Fixed OnPush change detection issues with proper `markForCheck()` triggers
615
+ - โœ… **Date Comparison**: Fixed null safety issues in date range comparisons
616
+ - โœ… **Memory Leaks**: Added cache size limits to prevent memory leaks
617
+ - โœ… **Type Safety**: Improved TypeScript types and null safety checks
618
+ - โœ… **Mobile UX**: Enhanced mobile interactions and touch feedback
619
+ - โœ… **Performance**: Optimized template bindings with memoized functions
620
+ - โœ… **Accessibility**: Better focus states and keyboard navigation
621
+ - โœ… **Build System**: Improved build configuration and optimization
622
+
623
+ ### **Performance Enhancements:**
624
+ - ๐Ÿš€ **Optimized Bundle Size**: Main bundle ~127KB (source maps excluded from published package)
625
+ - ๐Ÿš€ **40% Faster Rendering**: Enhanced OnPush change detection
626
+ - ๐Ÿš€ **60% Faster Selection**: Memoized date comparisons
627
+ - ๐Ÿš€ **Memory Efficient**: Cache size limits prevent memory leaks
628
+ - ๐Ÿš€ **Hardware Accelerated**: CSS optimizations for smooth animations
629
+ - ๐Ÿš€ **Better Tree-Shaking**: Optimized TypeScript compiler settings for smaller output
630
+ - ๐Ÿš€ **Production Optimized**: Source maps automatically removed from production builds
631
+
632
+ ## **๐Ÿ“ฑ Demo Application**
633
+
634
+ A comprehensive demo application is included to showcase all features with a modern, polished UI:
635
+
636
+ ```bash
637
+ # Clone the repository
638
+ git clone https://github.com/NGXSMK/ngxsmk-datepicker.git
639
+ cd ngxsmk-datepicker
640
+
641
+ # Install dependencies
642
+ npm install
643
+
644
+ # Run the demo app
645
+ npm start
646
+ ```
647
+
648
+ The demo includes:
649
+ - **Modern UI Design**: Beautiful glassmorphism effects, gradient themes, and polished visual hierarchy
650
+ - **Responsive Navigation**: Modern navbar with search, theme toggle, and mobile-friendly menu
651
+ - **Enhanced Sidebar**: Redesigned documentation sidebar with smooth animations and visual indicators
652
+ - **Signal Forms (Angular 21)** with writable signal binding examples
653
+ - **Theming** with CSS variables and Tailwind classes examples
654
+ - **Customization & A11y** with weekStart, yearRange, labels, and aria examples
655
+ - **Holiday Provider Integration** with US holidays
656
+ - **Single Date Selection** with weekend restrictions
657
+ - **Inline Range Picker** with toggle controls
658
+ - **Date Range with Time** selection
659
+ - **Multiple Date Selection** with action tracking
660
+ - **Programmatic Value Setting** for all selection modes
661
+ - **Theme Toggle** (Light/Dark mode) with automatic system preference detection
662
+ - **Customizable Calendar Views**: Year-picker, decade-picker, timeline view, and time-slider view
663
+
664
+ ## **๐Ÿ”ง Development**
665
+
666
+ ### **GitHub Actions**
667
+
668
+ The project uses GitHub Actions for automated deployment:
669
+
670
+ - **Deploy Demo App**: Automatically deploys the demo application to GitHub Pages on pushes to `main`/`master` branches
671
+ - Workflow: `.github/workflows/deploy-demo.yml`
672
+ - Triggers: Push to main/master or manual workflow dispatch
673
+ - Builds and deploys the demo app to GitHub Pages
674
+
675
+ ### **Building the Library**
676
+
677
+ ```bash
678
+ # Build the library (development)
679
+ npm run build
680
+
681
+ # Build optimized production version
682
+ # - Removes source maps automatically
683
+ # - Optimized TypeScript compilation
684
+ # - Enhanced tree-shaking
685
+ npm run build:optimized
686
+
687
+ # Analyze bundle size (excludes source maps)
688
+ npm run build:analyze
689
+ ```
690
+
691
+ **Build Output:**
692
+ - Main bundle: `dist/ngxsmk-datepicker/fesm2022/ngxsmk-datepicker.mjs` (~127KB)
693
+ - Type definitions: `dist/ngxsmk-datepicker/index.d.ts`
694
+ - Source maps: Automatically removed from production builds
695
+
696
+ ### **Running Tests**
697
+
698
+ ```bash
699
+ # Run all tests (library + demo app)
700
+ npm test
701
+
702
+ # Run library tests only
703
+ npx ng test ngxsmk-datepicker --no-watch --browsers=ChromeHeadless
704
+
705
+ # Run specific test file
706
+ npx ng test ngxsmk-datepicker --include="**/issue-13.spec.ts"
707
+
708
+ # Run tests in watch mode
709
+ npm test -- --watch
710
+ ```
711
+
712
+ ### **Code Quality Improvements**
713
+
714
+ The library now includes:
715
+ - โœ… **TypeScript Strict Mode**: Enhanced type safety
716
+ - โœ… **ESLint Configuration**: Code quality enforcement
717
+ - โœ… **Performance Monitoring**: Built-in performance metrics
718
+ - โœ… **Memory Leak Prevention**: Cache size limits and cleanup
719
+ - โœ… **Accessibility Testing**: WCAG compliance checks
720
+ - โœ… **Mobile Testing**: Touch interaction validation
721
+
722
+ ## **๐Ÿ“ฆ Package Structure**
723
+
724
+ ```
725
+ ngxsmk-datepicker/
726
+ โ”œโ”€โ”€ projects/
727
+ โ”‚ โ”œโ”€โ”€ ngxsmk-datepicker/ # Main library
728
+ โ”‚ โ””โ”€โ”€ demo-app/ # Demo application
729
+ โ”œโ”€โ”€ dist/ # Built packages
730
+ โ”œโ”€โ”€ docs/ # Documentation
731
+ โ””โ”€โ”€ scripts/ # Build scripts
732
+ ```
733
+
734
+ ## **๐ŸŽฏ Browser Support**
735
+
736
+ - **Chrome** 90+
737
+ - **Firefox** 88+
738
+ - **Safari** 14+
739
+ - **Edge** 90+
740
+ - **Mobile Safari** 14+
741
+ - **Chrome Mobile** 90+
742
+
743
+ ## **๐Ÿ—บ๏ธ Roadmap**
744
+
745
+ Check out our [Roadmap](ROADMAP.md) to see planned features, improvements, and how you can contribute. We're always looking for contributors, especially for issues labeled `good-first-issue` and `help-wanted`!
746
+
747
+ ## **๐Ÿค Contributions**
748
+
749
+ We welcome and appreciate contributions from the community! Whether it's reporting a bug, suggesting a new feature, or submitting code, your help is valuable.
750
+
751
+ ### **Development Setup**
752
+
753
+ 1. **Fork the repository** on GitHub
754
+ 2. **Clone your fork** to your local machine
755
+ 3. **Install dependencies**: `npm install`
756
+ 4. **Run the demo app**: `npm start`
757
+ 5. **Create a feature branch** for your changes
758
+ 6. **Commit your changes** following conventional commits
759
+ 7. **Submit a Pull Request** to the main branch
760
+
761
+ ### **Contribution Guidelines**
762
+
763
+ - Follow the existing code style
764
+ - Add tests for new features
765
+ - Update documentation as needed
766
+ - Ensure all tests pass
767
+ - Follow conventional commit messages
768
+
769
+ ## **๐Ÿ“„ Changelog**
770
+
771
+ ### **v1.9.22** (Stable)
772
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.22
773
+ - โœ… **Stable Release**: Version 1.9.22 is the current stable version
774
+ - ๐Ÿ› **Fixed**: Form control value initialization issue - datepicker now correctly displays month from form control values
775
+ - Fixed calendar month display when using Reactive Forms with initial values
776
+ - Added proper signal updates and change detection in `writeValue()` method
777
+ - ๐Ÿ› **Fixed**: Locale week start detection for en-GB and other European locales
778
+ - Added fallback logic for locales where `Intl.Locale.weekInfo` is not available
779
+ - Now correctly returns Monday (1) for en-GB and other European locales
780
+
781
+ ### **v1.9.21** (Stable)
782
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.21
783
+ - โœ… **Stable Release**: Version 1.9.21 is the current stable version
784
+ - ๐Ÿ“ฑ **Mobile-Specific Features**: Comprehensive mobile optimization
785
+ - Native date picker integration with automatic mobile detection
786
+ - Bottom sheet modal with swipe-to-dismiss gestures
787
+ - Enhanced touch gestures (double-tap, swipe navigation)
788
+ - Haptic feedback support for better mobile UX
789
+ - Mobile-optimized animations and keyboard handling
790
+ - ๐ŸŽฏ **Advanced Selection Modes**: Extended selection capabilities
791
+ - Week selection mode for selecting entire weeks
792
+ - Month selection mode for selecting full months
793
+ - Quarter selection mode for quarterly selections
794
+ - Year selection mode for annual date ranges
795
+ - โฑ๏ธ **Enhanced Time Selection**: Improved time picker
796
+ - Seconds selection with configurable intervals
797
+ - Better time picker UX and controls
798
+ - ๐Ÿ—๏ธ **Code Refactoring**: Improved architecture
799
+ - New services: CalendarGenerationService, DisplayFormattingService, DateValidationService
800
+ - Better code organization and maintainability
801
+ - Reduced component complexity
802
+ - ๐Ÿงช **E2E Testing**: Comprehensive end-to-end testing
803
+ - Playwright setup with multi-browser support
804
+ - Mobile viewport testing
805
+ - Automated test execution
806
+ - โ™ฟ **Accessibility Enhancements**: Better screen reader support
807
+ - Improved ARIA live regions
808
+ - Enhanced focus management
809
+ - Better keyboard navigation
810
+ - โšก **Performance Optimizations**: Infrastructure improvements
811
+ - Lazy loading calendar months with intelligent caching
812
+ - Virtual scrolling infrastructure
813
+ - Preloading adjacent months
814
+ - ๐Ÿงช **Test Coverage**: Comprehensive test suite
815
+ - 414 tests passing
816
+ - New service tests
817
+ - Updated component and utility tests
818
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.20
819
+
820
+ ### **v1.9.19** (Stable)
821
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.19
822
+ - โœ… **Stable Release**: Version 1.9.19 is the current stable version
823
+ - ๐ŸŽจ **Responsive Layout Redesign**: Complete redesign of demo project layout for all screen sizes (320px to desktop)
824
+ - ๐Ÿ“ฑ **Mobile Optimization**: Enhanced mobile experience with improved navbar, sidebar, hero section, and feature grid
825
+ - ๐Ÿงน **Code Cleanup**: Removed unnecessary comments for cleaner codebase
826
+ - ๐Ÿ”ง **Meta Tag Update**: Replaced deprecated `apple-mobile-web-app-capable` with `mobile-web-app-capable`
827
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.18
828
+
829
+ ### **v1.9.18** (Stable)
830
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.18
831
+ - โœ… **Stable Release**: Version 1.9.18 is the current stable version
832
+ - ๐Ÿ› **Fixed**: Improved mobile touch event handling - touch listeners now properly attach when calendar opens
833
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.17
834
+
835
+ ### **v1.9.17** (Stable)
836
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.17
837
+ - โœ… **Stable Release**: Version 1.9.17 is the current stable version
838
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.16
839
+ - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
840
+
841
+ ### **v1.9.16** (Stable)
842
+ - ๐Ÿ› **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 }`
843
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.16
844
+ - โœ… **Stable Release**: Version 1.9.16 is the current stable version
845
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.15
846
+ - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
847
+
848
+ ### **v1.9.15** (Stable)
849
+ - ๐Ÿ› **Moment Object Binding Fix**: Fixed Moment.js objects not binding correctly with ngModel
850
+ - ๐Ÿ› **Date Clicks After Navigation**: Fixed dates becoming unclickable after month navigation
851
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.15
852
+ - โœ… **Stable Release**: Version 1.9.15 is the current stable version
853
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.14
854
+ - โœ… **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
855
+
856
+ ### **v1.9.14** (Stable)
857
+ - ๐Ÿ› **Date Picker Selection Fix**: Fixed date picker selection issues, especially in range mode
858
+ - ๐Ÿ› **Moment.js Timezone Support**: Fixed timezone offset preservation for Moment.js objects
859
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.14
860
+ - โœ… **Stable Release**: Version 1.9.14 is the current stable version
861
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.13
862
+
863
+ ### **v1.9.13** (Stable)
864
+ - ๐Ÿ› **Bug Fixes**: Fixed `valueChange` event emitting null for range mode with ngModel
865
+ - ๐Ÿ› **Bug Fixes**: Fixed date selection becoming disabled after month navigation in range mode
866
+ - ๐Ÿ› **Bug Fixes**: Fixed Moment.js object handling in range values and arrays
867
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.13
868
+ - โœ… **Stable Release**: Version 1.9.13 is the current stable version
869
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.12
870
+
871
+ ### **v1.9.12** (Stable)
872
+ - ๐ŸŽ‰ **Version Update**: Updated to version 1.9.12
873
+ - โœ… **Stable Release**: Version 1.9.12 is the current stable version
874
+ - ๐Ÿ”„ **Backward Compatible**: Full backward compatibility with v1.9.11
875
+ - ๐Ÿ“š **Migration Guide**: See [MIGRATION.md](../../MIGRATION.md) for detailed migration instructions
876
+
877
+ ### **v1.9.11** (Stable)
878
+ - ๐Ÿ› **Moment.js Integration**: Fixed critical issue where Moment.js objects with custom date formats would not populate correctly
879
+ - Added `isMomentObject()` helper method to safely detect Moment.js instances
880
+ - Enhanced `_normalizeValue()` method to handle Moment.js objects directly
881
+ - Improved `parseCustomDateString()` method for TypeScript compatibility
882
+ - Added comprehensive support for format tokens: YYYY, YY, MM, M, DD, D, hh, h, HH, H, mm, m, ss, s, a, A
883
+ - Maintains full backward compatibility with Date objects, strings, and all other supported formats
884
+ - ๐ŸŽจ **Custom Format Parser**: Enhanced format token parsing with better TypeScript compatibility
885
+ - ๐Ÿ” **Moment.js Detection**: More robust detection of Moment.js objects across different versions
886
+ - ๐ŸŽฎ **Demo Application**: Added working Moment.js integration example with interactive controls
887
+
888
+ ### **v1.9.10** (Stable)
889
+ - ๐Ÿ› **Async Database Value Loading**: Enhanced datepicker to properly handle database values that load asynchronously
890
+ - Added fallback sync mechanism in `ngAfterViewInit` to catch async database loads
891
+ - Added delayed sync checks in `ngOnInit`, `ngOnChanges`, and `ngAfterViewInit`
892
+ - Added sync on calendar open, focus events, and touch events
893
+ - Extended interval sync duration to 30 seconds with 100ms check intervals
894
+ - ๐Ÿ”ง **TypeScript Compilation Error**: Fixed `EffectRef` type error when using Angular 17+ `effect()` API
895
+ - Changed `_fieldEffectDestroy: (() => void) | null` to `_fieldEffectRef: EffectRef | null`
896
+ - Updated effect cleanup to use `effectRef.destroy()` instead of function call
897
+ - Added proper `EffectRef` import from `@angular/core`
898
+ - ๐Ÿงช **Test Configuration**: Fixed test configuration for Angular 17+ compatibility
899
+ - Updated karma configuration to work with `@angular/build:karma` builder
900
+ - Simplified karma.conf.js to remove deprecated plugins
901
+ - Updated test script to target correct project
902
+
903
+ ### **v1.9.9** (Stable)
904
+ - ๐Ÿ› **Database Value Population**: Fixed critical issue where datepicker would not populate with values from database when using `[field]` input binding
905
+ - Added `_normalizeValue()` helper method to properly handle all value types
906
+ - Updated field effect and related methods to use `_normalizeValue()` instead of `_normalizeDate()`
907
+ - Fixed issue where string dates from database were not being parsed and displayed correctly
908
+ - Now properly handles Date objects, string dates, range objects, and arrays of dates
909
+
910
+ ### **v1.9.8** (Stable)
911
+ - ๐Ÿ› **Date Selection Reset Issue**: Fixed critical bug where selected dates would reset to today's date when using `[field]` input binding
912
+ - Fixed `applyCurrentTime` to create a new Date object instead of mutating the original
913
+ - Added `_isUpdatingFromInternal` flag to prevent field effect from resetting the value
914
+ - This ensures selected dates are properly stored in the form field
915
+
916
+ ### **v1.9.7** (Stable)
917
+ - ๐Ÿ› **Calendar Population**: Fixed critical issue where datepicker calendar would not populate with dates when opened
918
+ - Fixed issue when multiple datepickers were present in the same form
919
+ - Ensured `generateCalendar()` is called when opening the datepicker via click, touch, or programmatic methods
920
+
921
+ ### **v1.9.6** (Stable)
922
+ - ๐Ÿ› **Multiple Datepicker Management**: Fixed issue where multiple datepickers in the same form would open in the same centered location
923
+ - ๐Ÿ–ฑ๏ธ **Outside Click Detection**: Improved click detection to properly close datepicker when clicking outside
924
+ - ๐Ÿ”„ **Auto-close Other Datepickers**: When opening a datepicker, all other open datepickers in the same form are now automatically closed
925
+ - ๐Ÿ“ฑ **Mobile Datepicker Opening**: Fixed issue where datepicker modal would not open on mobile screens
926
+ - ๐Ÿ“ฑ **Datepicker Closing on Mobile**: Fixed issue where datepicker would open and immediately disappear on mobile devices
927
+ - ๐Ÿ‘† **Select Box Cursor**: Added pointer cursor to all select boxes (month, year, hour, minute, AM/PM) in the datepicker
928
+
929
+ ### **v1.9.5** (Stable)
930
+ - ๐Ÿ”ง **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
931
+ - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
932
+ - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
933
+ - Maintains backward compatibility with Angular 17-20 where field input is optional
934
+ - Resolves [#33](https://github.com/NGXSMK/ngxsmk-datepicker/issues/33)
935
+
936
+ ### **v1.9.4** (Stable)
937
+ - โœจ **Custom Date Format**: New `[displayFormat]` input property to display dates in custom formats
938
+ - Supports format strings like "MM/DD/YYYY hh:mm A"
939
+ - Works with date adapters (date-fns, dayjs, luxon) or built-in simple formatter
940
+ - Supports common format tokens: YYYY, MM, DD, hh, mm, A, etc.
941
+ - Resolves [#31](https://github.com/NGXSMK/ngxsmk-datepicker/issues/31)
942
+ - ๐Ÿ› **Time Selection Dropdowns**: Fixed visibility issues with time selection dropdowns
943
+ - Dropdowns now properly display and are not clipped by parent containers
944
+ - Improved z-index handling for time selection dropdowns
945
+ - Removed unnecessary scrollbars from datepicker wrapper
946
+ - Resolves [#32](https://github.com/NGXSMK/ngxsmk-datepicker/issues/32)
947
+
948
+ ### **v1.9.3** (Stable)
949
+ - โœจ **Time-Only Picker**: New `[timeOnly]` input property to display only time selection without calendar
950
+ - Hides calendar grid and shows only time controls (hour, minute, AM/PM)
951
+ - Automatically enables `showTime` when `timeOnly` is true
952
+ - Perfect for time selection scenarios where date is not needed
953
+ - Value is still a Date object using today's date with selected time
954
+ - Placeholder automatically changes to "Select Time" in time-only mode
955
+ - Resolves [#29](https://github.com/NGXSMK/ngxsmk-datepicker/issues/29)
956
+ - ๐ŸŽจ **Modern Demo App UI**: Complete redesign of the demo application
957
+ - Modern navbar with glassmorphism effects, search functionality, and improved theme toggle
958
+ - Redesigned sidebar with gradient backgrounds, smooth animations, and visual indicators
959
+ - Enhanced icon sizes and better visual hierarchy
960
+ - Improved responsive design with better mobile experience
961
+ - Automatic system theme detection (dark/light mode preference)
962
+ - Gradient accents, shadows, and modern design patterns throughout
963
+ - ๐Ÿงช **Test Suite**: Fixed 25+ failing tests across multiple test files
964
+ - Fixed date utils tests, calendar utils tests, timezone utils tests, edge cases tests
965
+ - Fixed adapters tests, performance utils tests, RTL tests, touch gestures tests
966
+ - Fixed calendar views tests, recurring dates utils tests
967
+ - All 353 tests now pass successfully
968
+
969
+ ### **v1.9.2** (Stable)
970
+ - ๐Ÿ“ฆ **Bundle Optimization**: Optimized bundle size with improved TypeScript compiler settings
971
+ - Main bundle: ~127KB (source maps excluded from published package)
972
+ - Enhanced tree-shaking with optimized imports and compiler options
973
+ - Added `importsNotUsedAsValues: "remove"` for smaller output
974
+ - Disabled `preserveConstEnums` for better inlining
975
+ - ๐Ÿ”ง **Build Process**:
976
+ - Source maps automatically removed from production builds (saves ~127KB)
977
+ - Improved build scripts with better error handling
978
+ - Enhanced bundle analysis that excludes source maps
979
+ - ๐Ÿ“ฆ **Package Configuration**:
980
+ - Fixed package.json exports to eliminate build warnings
981
+ - Optimized `files` array to exclude unnecessary files
982
+ - Updated exports field for better module resolution
983
+ - ๐Ÿงช **Test Configuration**:
984
+ - Added Zone.js polyfills to library test configuration
985
+ - Updated test commands to explicitly target library project
986
+ - Improved test reliability across Angular versions
987
+ - ๐Ÿ› **Bug Fixes**:
988
+ - Test suite configuration - added missing Zone.js polyfills for library tests
989
+ - Bundle analysis now correctly excludes source maps from size calculations
990
+ - Build warnings from conflicting export conditions resolved
991
+ - Source map removal script made more resilient for build environments
992
+
993
+ ### **v1.9.1** (Stable)
994
+ - ๐Ÿ› Minor bug fixes and improvements
995
+
996
+ ### **v1.9.0**
997
+ - โœจ **Extension Points & Hooks**: system for customization
998
+ - โŒจ๏ธ **Enhanced Keyboard Shortcuts**: Y, N, W keys with custom shortcut support
999
+ - ๐ŸŽจ **Modern UI/UX**: Improved animations and responsiveness
1000
+ - ๐Ÿ“š **API Documentation**: TypeDoc integration
1001
+ - ๐Ÿค– **Semantic Release**: Automated versioning and publishing
1002
+ - ๐Ÿš€ **Animation Performance**: Optimizations with GPU acceleration
1003
+ - ๐Ÿ” **Global Search**: Functionality in documentation
1004
+ - ๐Ÿ“ฑ **Mobile Playground**: For responsive testing
1005
+
1006
+ ### **v1.7.0**
1007
+ - ๐ŸŽฏ **Signal Forms Support**: Full Angular 21 signal forms integration with writable signals
1008
+ - ๐ŸŽจ **Tailwind Theming**: Added `classes` input for Tailwind CSS and custom class-based theming
1009
+ - ๐ŸŒ **Localization Improvements**: Added `weekStart` input to override locale-based week start day
1010
+ - ๐Ÿ“… **Year Range Configuration**: Added `yearRange` input to customize year dropdown range
1011
+ - โ™ฟ **Accessibility Enhancements**: Added customizable aria labels for all interactive elements
1012
+ - ๐Ÿท๏ธ **Custom Labels**: Added `clearLabel` and `closeLabel` inputs for button customization
1013
+ - ๐Ÿงช **Comprehensive Test Suite**: Added 56 tests covering all features and edge cases
1014
+ - ๐Ÿ› **Bug Fixes**: Fixed programmatic value setting and Angular 21 compatibility tests
1015
+ - ๐Ÿงน **Code Cleanup**: Removed unnecessary files, folders, and comments from codebase
1016
+ - ๐Ÿ“ **Test Improvements**: Enhanced test coverage with comprehensive feature tests
1017
+ - ๐Ÿ”ง **Test Fixes**: Fixed disabled date tests and integration test issues
1018
+ - ๐ŸŽฏ **Code Quality**: Improved code maintainability by removing redundant comments
1019
+
1020
+ ### **v1.6.0**
1021
+ - ๐ŸŽฏ **Programmatic Value Setting**: Added `value` input property to set datepicker value programmatically, perfect for server-side API data integration
1022
+ - ๐ŸŽจ **Enhanced Demo App**: Completely redesigned demo application with TokiForge-inspired modern UI and API documentation style
1023
+ - ๐Ÿš€ **GitHub Pages Deployment**: Added automated GitHub Pages deployment with GitHub Actions workflow
1024
+ - ๐Ÿ“š **Improved Documentation**: Enhanced demo app with comprehensive examples, code snippets, and interactive documentation
1025
+ - ๐Ÿ”ง **Build Optimizations**: Updated CSS budget limits and improved build configuration
1026
+ - ๐ŸŽจ **Modern UI Design**: Beautiful gradient themes, glass-morphism effects, and improved visual hierarchy
1027
+ - ๐Ÿ“ฑ **Better UX**: Enhanced navigation, code copying functionality, and responsive design
1028
+ - ๐Ÿ› ๏ธ **Developer Experience**: Improved build scripts and deployment automation
1029
+
1030
+ ### **v1.5.0**
1031
+ - ๐Ÿš€ **Angular 21 Support**: Full compatibility with Angular 21 RC versions
1032
+ - โšก **Zone-less Support**: Works without zone.js for improved performance
1033
+ - ๐Ÿงช **Comprehensive Tests**: Added extensive test suite covering all features
1034
+ - ๐Ÿ”ง **Angular 17-21 Compatibility**: Supports Angular versions 17, 18, 19, 20, and 21
1035
+ - ๐Ÿ“ฆ **Dependency Updates**: Updated to Angular 21 RC and latest build tools
1036
+ - ๐Ÿงน **Code Cleanup**: Removed unnecessary documentation files and comments
1037
+ - ๐Ÿ“ **Improved Keywords**: Added version-specific keywords for better discoverability
1038
+ - ๐ŸŽฏ **Peer Dependencies**: Updated to support Angular 17-21 range
1039
+
1040
+ ### **v1.4.16**
1041
+ - ๐Ÿ“š **Documentation**: Comprehensive README updates with latest features and improvements
1042
+ - ๐ŸŽฏ **Version Management**: Updated version references across all package files
1043
+ - ๐Ÿ“– **User Experience**: Enhanced documentation with better examples and API references
1044
+ - ๐Ÿ”ง **Maintenance**: Improved project structure and documentation consistency
1045
+ - ๐Ÿ“ฆ **Package Updates**: Synchronized version numbers across all package.json files
1046
+ - ๐ŸŽจ **Documentation**: Added detailed bug fixes and performance metrics
1047
+ - ๐Ÿš€ **Developer Experience**: Better setup instructions and contribution guidelines
1048
+
1049
+ ### **v1.4.15**
1050
+ - ๐Ÿ› **Bug Fixes**: Fixed 10 critical bugs including change detection issues and date comparison errors
1051
+ - โšก **Performance**: Enhanced OnPush change detection with proper triggers
1052
+ - ๐ŸŽฏ **Memory Management**: Added cache size limits to prevent memory leaks
1053
+ - ๐Ÿ”ง **Type Safety**: Improved TypeScript types and null safety
1054
+ - ๐Ÿ“ฑ **Mobile Optimization**: Enhanced mobile responsive design with touch-friendly interactions
1055
+ - ๐ŸŽจ **UI Improvements**: Better visual feedback and accessibility
1056
+ - ๐Ÿš€ **Build Optimization**: Improved build configuration and tree-shaking
1057
+ - ๐Ÿงน **Code Quality**: Enhanced code maintainability and performance
1058
+
1059
+ ### **v1.4.13**
1060
+ - ๐Ÿšซ **Disabled Dates**: New `disabledDates` input property to disable specific dates
1061
+ - ๐ŸŽฏ **Date String Support**: Supports both string dates (MM/DD/YYYY) and Date objects
1062
+ - ๐Ÿ’ก **Holiday Tooltips**: Hover over holiday dates to see holiday names as tooltips
1063
+ - ๐ŸŽจ **Enhanced UX**: Better visual feedback for disabled dates
1064
+ - ๐Ÿ“ฆ **Improved API**: More flexible date disabling options
1065
+
1066
+ ### **v1.4.12**
1067
+ - โšก **Instant Navigation**: Removed all animations for lightning-fast arrow navigation
1068
+ - ๐Ÿšซ **Smart Back Arrow**: Automatically disables back arrow when minDate is set
1069
+ - ๐ŸŽฏ **Better UX**: Prevents navigation to invalid date ranges
1070
+ - ๐Ÿ—“๏ธ **Previous Month Days**: Now shows last few days of previous month for better context
1071
+ - ๐ŸŽจ **Enhanced Styling**: Improved visual hierarchy with better day cell sizing
1072
+ - ๐Ÿ–ฑ๏ธ **Interactive Previous Days**: Previous month days are now selectable and interactive
1073
+ - ๐Ÿงน **Code Optimization**: Cleaner, more maintainable codebase
1074
+ - ๐Ÿ“ฆ **Smaller Bundle**: Reduced CSS and JavaScript footprint
1075
+
1076
+ ### **v1.4.11**
1077
+ - ๐ŸŽจ **UI Improvements**: Enhanced day cell sizing and visual hierarchy
1078
+ - ๐Ÿ–ฑ๏ธ **Better Interactions**: Improved click and hover states for previous month days
1079
+
1080
+ ### **v1.4.10**
1081
+ - ๐Ÿ—“๏ธ **Previous Month Display**: Added last few days of previous month for better context
1082
+ - ๐ŸŽฏ **Smart Selection**: Previous month days are now selectable and interactive
1083
+
1084
+ ### **v1.4.9**
1085
+ - ๐Ÿšซ **Range Fix**: Fixed range highlighting on empty/previous month days
1086
+ - ๐ŸŽจ **Styling Updates**: Improved visual consistency across all day types
1087
+
1088
+ ### **v1.4.8**
1089
+ - โšก **Performance**: Optimized calendar generation and rendering
1090
+ - ๐Ÿงน **Code Cleanup**: Removed unused animation code and improved maintainability
1091
+
1092
+ ### **v1.4.6**
1093
+ - ๐Ÿ”ง **Fixed Import Paths**: Corrected package exports for proper module resolution
1094
+ - ๐Ÿ“ฆ **Better Package Structure**: Improved npm package configuration
1095
+
1096
+ ### **v1.4.5**
1097
+ - ๐Ÿ› Bug fixes and stability improvements
1098
+ - ๐Ÿ”ง Enhanced error handling
1099
+ - ๐Ÿ“ฑ Improved mobile responsiveness
1100
+ - ๐ŸŽจ Minor UI/UX improvements
1101
+
1102
+ ### **v1.4.0**
1103
+ - โœ… Performance optimizations (30% smaller bundle)
1104
+ - โœ… OnPush change detection strategy
1105
+ - โœ… Memoized date comparisons
1106
+ - โœ… Tree-shakable architecture
1107
+ - โœ… Enhanced TypeScript support
1108
+ - โœ… Improved accessibility
1109
+ - โœ… Better mobile responsiveness
1110
+
1111
+ ### **Previous Versions**
1112
+ - v1.3.5: Initial release with core features
1113
+ - v1.3.4: Bug fixes and improvements
1114
+ - v1.3.3: Holiday provider integration
1115
+
1116
+ ## **๐ŸŽจ Theming with TokiForge**
1117
+
1118
+ Looking for a powerful theming solution for your Angular application? Check out **[TokiForge](https://tokiforge.github.io/tokiforge/)** โ€” an open-source modern design token & theme engine that provides runtime theme switching for React, Vue, Svelte, Angular, and any framework.
1119
+
1120
+ ### Why TokiForge?
1121
+
1122
+ - โœ… **Framework-agnostic** โ€” Works with Angular, React, Vue, Svelte, and vanilla JS
1123
+ - โœ… **Runtime theme switching** โ€” Change themes dynamically without rebuilds
1124
+ - โœ… **Type-safe** โ€” Full TypeScript support for design tokens
1125
+ - โœ… **Lightweight** โ€” <3 KB gzipped runtime footprint
1126
+ - โœ… **CSS custom properties** โ€” Zero JS overhead in static mode
1127
+ - โœ… **SSR compatible** โ€” Works seamlessly with Angular Universal
1128
+
1129
+ Perfect for managing design tokens, creating theme systems, and implementing dark mode in your Angular applications!
1130
+
1131
+ **๐Ÿ‘‰ [Learn more about TokiForge โ†’](https://tokiforge.github.io/tokiforge/)**
1132
+
1133
+ ---
1134
+
1135
+ ## **๐Ÿ“œ License**
1136
+
1137
+ MIT License - see [LICENSE](LICENSE) file for details.
1138
+
1139
+ ## **๐Ÿ” SEO & Discoverability**
1140
+
1141
+ This library is optimized for search engine visibility:
1142
+ - **Keywords**: Angular datepicker, date range picker, calendar component, Angular 17-21, TypeScript, Signal Forms, SSR compatible
1143
+ - **Meta Tags**: Comprehensive Open Graph and Twitter Card support
1144
+ - **Structured Data**: JSON-LD schema markup for better search results
1145
+ - **Documentation**: Complete API documentation with examples
1146
+ - **Performance**: Optimized bundle size (~127KB) for fast loading
1147
+
1148
+ ## **๐Ÿ‘จโ€๐Ÿ’ป Author**
1149
+
1150
+ **Sachin Dilshan**
1151
+ - ๐Ÿ“ง Email: [sachindilshan040@gmail.com](mailto:sachindilshan040@gmail.com)
1152
+ - ๐Ÿ™ GitHub: [@toozuuu](https://github.com/toozuuu)
1153
+ - ๐Ÿ“ฆ NPM: [ngxsmk-datepicker](https://www.npmjs.com/package/ngxsmk-datepicker)
1154
+ - ๐Ÿ’ผ LinkedIn: [sachindilshan](https://www.linkedin.com/in/sachindilshan/)
1155
+
1156
+ ## **โญ Support**
1157
+
1158
+ If you find this library helpful, please consider:
1159
+ - โญ **Starring** the repository
1160
+ - ๐Ÿ› **Reporting** bugs and issues
1161
+ - ๐Ÿ’ก **Suggesting** new features
1162
+ - ๐Ÿค **Contributing** code improvements
1163
+ - ๐Ÿ“ข **Sharing** with the community