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 +73 -95
- package/docs/header-banner.png +0 -0
- package/fesm2022/ngxsmk-datepicker.mjs +7 -35
- package/package.json +1 -1
- package/types/ngxsmk-datepicker.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,72 +1,74 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
[](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/LICENSE)
|
|
6
|
-
[](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
|
-
**
|
|
9
|
+
# **ngxsmk-datepicker** – Modern Angular Date Picker & Range Picker
|
|
10
|
+
### *The Gold Standard for Premium Angular Calendar Selection*
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
[](https://www.npmjs.com/package/ngxsmk-datepicker)
|
|
13
|
+
[](https://angular.io/)
|
|
14
|
+
[](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/LICENSE)
|
|
15
|
+
[](https://bundlephobia.com/package/ngxsmk-datepicker)
|
|
16
|
+
[](https://angular.dev/guide/zoneless)
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
**`npm i ngxsmk-datepicker`**
|
|
13
19
|
|
|
14
|
-
ngxsmk-datepicker
|
|
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
|
-
|
|
22
|
+
</div>
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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="
|
|
26
|
-
<img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/1.png" alt="Angular Single
|
|
27
|
-
|
|
28
|
-
<img src="https://github.com/NGXSMK/ngxsmk-datepicker/raw/main/projects/ngxsmk-datepicker/docs/
|
|
29
|
-
|
|
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
|
-
|
|
36
|
-
* **
|
|
37
|
-
* **
|
|
38
|
-
* **
|
|
39
|
-
* **
|
|
40
|
-
* **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* **
|
|
44
|
-
* **
|
|
45
|
-
* **
|
|
46
|
-
* **
|
|
47
|
-
* **
|
|
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.
|
|
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
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
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
|
-
### **
|
|
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
|
|
642
|
+
<!-- Force German Locale -->
|
|
659
643
|
<ngxsmk-datepicker [locale]="'de-DE'"></ngxsmk-datepicker>
|
|
660
644
|
|
|
661
|
-
<!--
|
|
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
|
-
|
|
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
|