ngxsmk-datepicker 2.0.8 → 2.0.9

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,72 +1,74 @@
1
- # **ngxsmk-datepicker** - Modern Angular Date Picker Component
1
+ <!--
2
+ SEO Keywords: Angular DatePicker, Angular Date Range Picker, Lightweight Calendar Component, Angular Signals DatePicker, SSR Ready DatePicker, Zoneless Angular, A11y DatePicker, Mobile-Friendly DatePicker, Ionic DatePicker
3
+ Meta Description: The most powerful, lightweight, and accessible date and range picker for modern Angular (17-21+). Built with Signals, Zoneless-ready, and zero dependencies.
4
+ -->
2
5
 
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)](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/LICENSE)
6
- [![Bundle Size](https://img.shields.io/badge/bundle-~127KB-green.svg)](https://bundlephobia.com/package/ngxsmk-datepicker)
6
+ <div align="center">
7
+ <img src="docs/header-banner.png" alt="ngxsmk-datepicker - Lightweight Angular Date Range Picker" width="100%" />
7
8
 
8
- **npm i ngxsmk-datepicker**
9
+ # **ngxsmk-datepicker** – Modern Angular Date Picker & Range Picker
10
+ ### *The Gold Standard for Premium Angular Calendar Selection*
9
11
 
10
- > **Stable Version**: `2.0.8` is the current stable release. For production use, install the latest version from npm.
12
+ [![npm version](https://img.shields.io/npm/v/ngxsmk-datepicker.svg?style=flat-square&color=6d28d9)](https://www.npmjs.com/package/ngxsmk-datepicker)
13
+ [![Angular](https://img.shields.io/badge/Angular-17%2B-DD0031.svg?style=flat-square&logo=angular)](https://angular.io/)
14
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/LICENSE)
15
+ [![Bundle Size](https://img.shields.io/badge/bundle-~127KB-success.svg?style=flat-square)](https://bundlephobia.com/package/ngxsmk-datepicker)
16
+ [![Zoneless](https://img.shields.io/badge/Zoneless-Ready-blueviolet.svg?style=flat-square)](https://angular.dev/guide/zoneless)
11
17
 
12
- > ⚠️ **Warning**: Version `1.9.26` contains broken styles. If you are using `1.9.26`, please upgrade to `1.9.28` or downgrade to `1.9.25` immediately.
18
+ **`npm i ngxsmk-datepicker`**
13
19
 
14
- 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.
20
+ [Explore Live Demo](https://ngxsmk.github.io/ngxsmk-datepicker/) [API Documentation](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/projects/ngxsmk-datepicker/docs/API.md) [Submit Issue](https://github.com/NGXSMK/ngxsmk-datepicker/issues)
15
21
 
16
- **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, Angular datepicker Europe, Angular datepicker Deutschland, Angular datepicker France, Angular datepicker España, Angular datepicker Italia, Angular datepicker Nederland, Angular datepicker Polska, Angular datepicker Portugal, Angular datepicker Sverige, Angular datepicker Norge, Angular datepicker Suomi, Angular datepicker Danmark, Angular datepicker België, Angular datepicker Schweiz, Angular datepicker Österreich
22
+ </div>
17
23
 
18
- * Github: [https://github.com/NGXSMK/ngxsmk-datepicker](https://github.com/NGXSMK/ngxsmk-datepicker)
19
- * **GitHub Pages Demo**: [https://ngxsmk.github.io/ngxsmk-datepicker/](https://ngxsmk.github.io/ngxsmk-datepicker/)
24
+ ---
25
+
26
+ ### **Overview**
27
+
28
+ **ngxsmk-datepicker** is a high-performance, enterprise-ready date and range picker engineered for the modern Angular ecosystem (v17+). Built from the ground up with **Angular Signals**, it delivers a seamless, zoneless-ready experience for both desktop and mobile (Ionic) applications.
29
+
30
+ > **Stable Release**: `v2.0.9` is live! This version brings 100% localization coverage for 8 languages and experimental Signal Forms support.
31
+
32
+ ---
33
+
34
+ ### **📌 Table of Contents**
20
35
 
21
- 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.
36
+ 1. [📷 Screenshots](#-screenshots)
37
+ 2. [✨ Features](#-features)
38
+ 3. [📋 Compatibility](#-compatibility)
39
+ 4. [🌍 Localization (i18n)](#-localization-i18n)
40
+ 5. [📦 Installation](#-installation)
41
+ 6. [🚀 Quick Start](#-quick-start)
42
+ 7. [🔌 Framework Integration](#-framework-integration)
43
+ 8. [⚙️ API Reference](#-api-reference)
44
+ 9. [🎨 Theming](#-theming)
45
+ 10. [⌨️ Keyboard Navigation](#-keyboard-navigation)
46
+
47
+ ---
22
48
 
23
49
  ## 📷 Screenshots
24
50
 
25
- <p align="left">
26
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/1.png" alt="Angular Single Date Selection" width="420" />
27
- &nbsp;&nbsp;
28
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/2.png" alt="Angular Date Range Selection" width="420" />
29
- &nbsp;&nbsp;
30
- <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/3.png" alt="Angular Date Mobile Screen Playground" width="420" />
51
+ <p align="center">
52
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/1.png" alt="Angular Standalone DatePicker Single Selection Mode" width="30%" />
53
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/2.png" alt="Angular Date Range Picker Selection Mode" width="30%" />
54
+ <img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/3.png" alt="Mobile Angular DatePicker Ionic Compatibility" width="30%" />
31
55
  </p>
32
56
 
33
57
  ## **✨ Features**
34
58
 
35
- * **Multiple Selection Modes**: Supports `single`, `range`, and `multiple` date selection.
36
- * **Smart Range Reselection**: Clicking the start date again after selecting a complete range clears only the end date, allowing quick range adjustments without clearing the entire 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**: Supports both **12-hour clock with AM/PM toggle** and **24-hour military time** (via `use24Hour` input).
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**: Fully compatible with the officially released Angular 21, including Signal Forms, Vitest, and zoneless by default.
58
- * **Modern Control Flow**: Uses Angular's latest `@if` and `@for` block syntax for superior performance and reduced bundle overhead.
59
- * **Optimized Imports**: Leverages modern standalone architecture with individual directive imports for maximum tree-shaking efficiency.
60
- * **Monorepo Compatible**: Enhanced static analysis and module resolution for seamless integration in Nx or other monorepo setups.
61
- * **Performance Optimized**: Lazy loading calendar months, intelligent caching, and virtual scrolling infrastructure.
62
- * **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.
63
- * **Enhanced Keyboard Navigation**: Extended keyboard shortcuts (Y for yesterday, N for tomorrow, W for next week) with custom shortcut support.
64
- * **Modern UI/UX**: Polished design with improved spacing, shadows, animations, and accessibility.
65
- * **Reduced Motion Support**: Respects `prefers-reduced-motion` for accessibility.
66
- * **Comprehensive Testing**: Extensive test coverage (67.6% statements, 57.37% branches, 79.67% functions, 68.22% lines) with 1034+ tests covering keyboard navigation, time handling, SSR, RTL, touch gestures, edge cases, error handling, async operations, DOM manipulation, integration flows, cross-browser compatibility, performance, memory management, and accessibility.
67
- * **CI/CD Integration**: Automated testing and coverage reporting via GitHub Actions.
68
- * **Customizable Calendar Views**: Year-picker, decade-picker, timeline view, and time-slider view for diverse use cases.
69
- * **Modern Demo App**: Beautiful demo application with glassmorphism effects, gradient themes, and responsive design.
59
+ ### **Core Capabilities**
60
+ * 💎 **Signal-Driven Engine**: Hyper-reactive state management using Angular Signals.
61
+ * 🌓 **Native Dark Mode**: Beautifully crafted themes for light and dark environments.
62
+ * 📱 **Mobile-First UX**: Native mobile picker integration with touch gestures and haptic feedback.
63
+ * 🧩 **Zero Dependencies**: Lightweight standalone component with no external bloat.
64
+ * **Performance++**: Lazy-loaded calendar months, memoized calculations, and tree-shakable architecture.
65
+
66
+ ### **Advanced Functionality**
67
+ * 🌐 **8-Language i18n**: Full localization for `en`, `de`, `es`, `sv`, `ko`, `zh`, `ja`, and `fr`.
68
+ * 🛠️ **Plugin Architecture**: Extend functionality via hooks for rendering, validation, and shortcuts.
69
+ * 🧪 **Signal Forms Native**: Direct integration with Angular 21's new Signal Forms API.
70
+ * 🚀 **Zoneless Ready**: Optimized for the future of Angular—works perfectly without zone.js.
71
+ * **Full Accessibility**: WAI-ARIA compliant with extensive keyboard navigation support.
70
72
 
71
73
  ## **📋 Compatibility**
72
74
 
@@ -128,7 +130,7 @@ For details, see [CONTRIBUTING.md](https://github.com/NGXSMK/ngxsmk-datepicker/b
128
130
 
129
131
  Install the package using npm:
130
132
 
131
- npm install ngxsmk-datepicker@2.0.8
133
+ npm install ngxsmk-datepicker@2.0.9
132
134
 
133
135
  ## **Usage**
134
136
 
@@ -619,56 +621,32 @@ Control the visibility of the calendar icon button:
619
621
  </ngxsmk-datepicker>
620
622
  ```
621
623
 
622
- ## **🌍 Localization**
624
+ ## **🌍 Localization (i18n)**
623
625
 
624
- The `locale` input controls all internationalization. It automatically formats month names, weekday names, and sets the first day of the week.
626
+ The `locale` input controls all internationalization. It automatically formats month names, weekday names, and sets the first day of the week based on BCP 47 language tags.
625
627
 
626
- ```html
627
- <ngxsmk-datepicker [locale]="'de-DE'"></ngxsmk-datepicker>
628
-
629
- <ngxsmk-datepicker [locale]="'fr-FR'"></ngxsmk-datepicker>
630
- ```
631
-
632
- 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.
628
+ ### **Global Language Support**
629
+ ngxsmk-datepicker v2.0.9 now features **full localization synchronization** for:
630
+ - 🇺🇸 English (`en`)
631
+ - 🇩🇪 German (`de`)
632
+ - 🇫🇷 French (`fr`)
633
+ - 🇪🇸 Spanish (`es`)
634
+ - 🇸🇪 Swedish (`sv`)
635
+ - 🇰🇷 Korean (`ko`)
636
+ - 🇨🇳 Chinese (`zh`)
637
+ - 🇯🇵 Japanese (`ja`)
633
638
 
634
- ### **European Localization Support**
635
-
636
- ngxsmk-datepicker provides comprehensive support for European locales and date formats:
637
-
638
- **Supported European Locales:**
639
- - 🇩🇪 **Germany**: `de-DE`, `de-AT`, `de-CH` - DD.MM.YYYY format, Monday week start
640
- - 🇫🇷 **France**: `fr-FR`, `fr-BE`, `fr-CH` - DD/MM/YYYY format, Monday week start
641
- - 🇪🇸 **Spain**: `es-ES` - DD/MM/YYYY format, Monday week start
642
- - 🇮🇹 **Italy**: `it-IT`, `it-CH` - DD/MM/YYYY format, Monday week start
643
- - 🇳🇱 **Netherlands**: `nl-NL`, `nl-BE` - DD-MM-YYYY format, Monday week start
644
- - 🇵🇱 **Poland**: `pl-PL` - DD.MM.YYYY format, Monday week start
645
- - 🇵🇹 **Portugal**: `pt-PT` - DD/MM/YYYY format, Monday week start
646
- - 🇸🇪 **Sweden**: `sv-SE` - YYYY-MM-DD format, Monday week start
647
- - 🇳🇴 **Norway**: `no-NO` - DD.MM.YYYY format, Monday week start
648
- - 🇫🇮 **Finland**: `fi-FI` - DD.MM.YYYY format, Monday week start
649
- - 🇩🇰 **Denmark**: `da-DK` - DD.MM.YYYY format, Monday week start
650
- - 🇧🇪 **Belgium**: `nl-BE`, `fr-BE` - Regional format support
651
- - 🇨🇭 **Switzerland**: `de-CH`, `fr-CH`, `it-CH` - Multi-language support
652
- - 🇦🇹 **Austria**: `de-AT` - German format with Austrian preferences
653
- - 🇬🇧 **United Kingdom**: `en-GB` - DD/MM/YYYY format, Monday week start
654
-
655
- **European Date Format Examples:**
639
+ ### **Usage Example**
656
640
 
657
641
  ```html
658
- <!-- German format (DD.MM.YYYY) -->
642
+ <!-- Force German Locale -->
659
643
  <ngxsmk-datepicker [locale]="'de-DE'"></ngxsmk-datepicker>
660
644
 
661
- <!-- French format (DD/MM/YYYY) -->
662
- <ngxsmk-datepicker [locale]="'fr-FR'"></ngxsmk-datepicker>
663
-
664
- <!-- Swedish format (YYYY-MM-DD) -->
645
+ <!-- Swedish with YYYY-MM-DD format and Monday week start -->
665
646
  <ngxsmk-datepicker [locale]="'sv-SE'"></ngxsmk-datepicker>
666
-
667
- <!-- UK format (DD/MM/YYYY) -->
668
- <ngxsmk-datepicker [locale]="'en-GB'"></ngxsmk-datepicker>
669
647
  ```
670
648
 
671
- All European locales automatically use **Monday as the week start day** (ISO 8601 standard), which is the standard in most European countries.
649
+ The component automatically uses ISO 8601 standards (Monday start) for European locales and appropriate regional date formats.
672
650
 
673
651
  ## **🖥️ Server-Side Rendering (SSR)**
674
652
 
Binary file