ngxsmk-datepicker 2.2.8 → 2.2.11

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
@@ -13,26 +13,27 @@
13
13
  [![npm version](https://img.shields.io/npm/v/ngxsmk-datepicker.svg?style=flat-square&color=6d28d9)](https://www.npmjs.com/package/ngxsmk-datepicker)
14
14
  [![Angular](https://img.shields.io/badge/Angular-17%2B-DD0031.svg?style=flat-square&logo=angular)](https://angular.io/)
15
15
  [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/LICENSE)
16
+ [![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-toozuuu-orange?style=flat-square&logo=buy-me-a-coffee)](https://buymeacoffee.com/toozuuu)
16
17
  [![Bundle Size](https://img.shields.io/badge/bundle-~127KB-success.svg?style=flat-square)](https://bundlephobia.com/package/ngxsmk-datepicker)
17
18
  [![Zoneless](https://img.shields.io/badge/Zoneless-Ready-blueviolet.svg?style=flat-square)](https://angular.dev/guide/zoneless)
18
19
 
19
20
  **`npm i ngxsmk-datepicker`**
20
21
 
21
- [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)
22
+ [Explore Live Demo](https://ngxsmk.github.io/ngxsmk-datepicker/) • [Buy me a coffee](https://buymeacoffee.com/toozuuu) • [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)
22
23
 
23
24
  </div>
24
25
 
25
26
  ---
26
27
 
27
- **Last updated:** March 21, 2026 · **Current stable:** v2.2.8
28
+ **Last updated:** March 24, 2026 · **Current stable:** v2.2.11
28
29
 
29
30
  ### **Overview**
30
31
 
31
32
  **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.
32
33
 
33
- > **Stable Release**: `v2.2.8` restores correct **npm** artifacts (compiled `fesm2022/` and types), adds range-mode **`allowSameDay`** for single-day selections, and continues to ship **IANA timezone** support, validation fixes, and strict TypeScript improvements from the v2.2.x line.
34
+ > **Stable Release**: `v2.2.11` restores correct **npm** artifacts (compiled `fesm2022/` and types), adds range-mode **`allowSameDay`** for single-day selections, and continues to ship **IANA timezone** support, validation fixes, and strict TypeScript improvements from the v2.2.x line.
34
35
  >
35
- > ⚠️ **Important**: Versions 2.0.10 and 2.0.11 are broken and have been unpublished. Please use v2.2.8 or later.
36
+ > ⚠️ **Important**: Versions 2.0.10 and 2.0.11 are broken and have been unpublished. Please use v2.2.11 or later.
36
37
 
37
38
  ---
38
39
 
@@ -590,7 +591,7 @@ The `locale` input controls all internationalization. It automatically formats m
590
591
 
591
592
  ### **Global Language Support**
592
593
 
593
- ngxsmk-datepicker v2.2.8 now features **full localization synchronization** for:
594
+ ngxsmk-datepicker v2.2.11 now features **full localization synchronization** for:
594
595
 
595
596
  - 🇺🇸 English (`en`)
596
597
  - 🇩🇪 German (`de`)
@@ -849,416 +850,16 @@ We welcome and appreciate contributions from the community! Whether it's reporti
849
850
 
850
851
  For a full list of changes, please refer to the [CHANGELOG.md](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/CHANGELOG.md) file.
851
852
 
852
- ### **v2.2.8** (Current Stable)
853
+ ### **v2.2.11** (Current Stable)
853
854
 
854
- - 🎉 **Version Update**: Updated to version 2.2.8.
855
+ - 🎉 **Version Update**: Updated to version 2.2.11.
855
856
  - 📦 **npm**: Published tarballs again include `fesm2022/` and TypeScript declarations (release pipeline runs `ng build` before publish).
856
857
  - 📅 **Range mode**: Optional `allowSameDay` for single-day ranges (double-click same date or close popover after one day).
857
858
  - ✅ **Prior fixes**: IANA timezone “Today”, `minDate` normalization, strict typings, and UI polish from v2.2.6 remain included.
858
859
 
859
- ### **v1.9.24**
860
-
861
- - 🎉 **Version Update**: Updated to version 1.9.24
862
- - ✅ **Stable Release**: Version 2.2.8 is the current stable version
863
-
864
- ### **v1.9.23**
865
-
866
- - 🐛 **Fixed**: CSS Variables Theming (Issue #84) - CSS variables theming now works when variables are defined in global `:root` selector
867
- - Enhanced CSS selector from `:root` to `:root, :root > body` for higher specificity
868
- - Added `!important` flags to inline styles to ensure they override existing styles
869
- - ThemeBuilderService now properly overrides global stylesheet variables
870
- - Updated documentation to explain the fix and provide guidance
871
- - Resolves issue where theme variables defined in global stylesheets were not being applied
872
-
873
- ### **v1.9.22**
874
-
875
- - 🎉 **Version Update**: Updated to version 1.9.22
876
- - 🐛 **Fixed**: Form control value initialization issue - datepicker now correctly displays month from form control values
877
- - Fixed calendar month display when using Reactive Forms with initial values
878
- - Added proper signal updates and change detection in `writeValue()` method
879
- - 🐛 **Fixed**: Locale week start detection for en-GB and other European locales
880
- - Added fallback logic for locales where `Intl.Locale.weekInfo` is not available
881
- - Now correctly returns Monday (1) for en-GB and other European locales
882
-
883
- ### **v1.9.21**
884
-
885
- - 🎉 **Version Update**: Updated to version 1.9.21
886
- - 📱 **Mobile-Specific Features**: Comprehensive mobile optimization
887
- - Native date picker integration with automatic mobile detection
888
- - Bottom sheet modal with swipe-to-dismiss gestures
889
- - Enhanced touch gestures (double-tap, swipe navigation)
890
- - Haptic feedback support for better mobile UX
891
- - Mobile-optimized animations and keyboard handling
892
- - 🎯 **Advanced Selection Modes**: Extended selection capabilities
893
- - Week selection mode for selecting entire weeks
894
- - Month selection mode for selecting full months
895
- - Quarter selection mode for quarterly selections
896
- - Year selection mode for annual date ranges
897
- - ⏱️ **Enhanced Time Selection**: Improved time picker
898
- - Seconds selection with configurable intervals
899
- - Better time picker UX and controls
900
- - 🏗️ **Code Refactoring**: Improved architecture
901
- - New services: CalendarGenerationService, DisplayFormattingService, DateValidationService
902
- - Better code organization and maintainability
903
- - Reduced component complexity
904
- - ♿ **Accessibility Enhancements**: Better screen reader support
905
- - Improved ARIA live regions
906
- - Enhanced focus management
907
- - Better keyboard navigation
908
- - ⚡ **Performance Optimizations**: Infrastructure improvements
909
- - Lazy loading calendar months with intelligent caching
910
- - Virtual scrolling infrastructure
911
- - Preloading adjacent months
912
- - 🧪 **Test Coverage**: Comprehensive test suite
913
- - 414 tests passing
914
- - New service tests
915
- - Updated component and utility tests
916
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.20
917
-
918
- ### **v1.9.20**
919
-
920
- - 🎉 **Version Update**: Updated to version 1.9.20
921
- - 🐛 **Bug Fix (Issue #71)**: Fixed `TypeError: window.matchMedia is not a function` error in test environments (jsdom/Vitest)
922
- - Added error handling for `window.matchMedia` in `applyAnimationConfig()` method
923
- - Component now gracefully handles missing `matchMedia` API in test environments
924
- - Prevents test failures when running with Vitest and jsdom
925
- - ✅ **Test Coverage**: Added comprehensive test coverage for `matchMedia` compatibility scenarios
926
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.19
927
-
928
- ### **v1.9.19**
929
-
930
- - 🎉 **Version Update**: Updated to version 1.9.19
931
- - 🎨 **Responsive Layout Redesign**: Complete redesign of demo project layout for all screen sizes (320px to desktop)
932
- - 📱 **Mobile Optimization**: Enhanced mobile experience with improved navbar, sidebar, hero section, and feature grid
933
- - 🧹 **Code Cleanup**: Removed unnecessary comments for cleaner codebase
934
- - 🔧 **Meta Tag Update**: Replaced deprecated `apple-mobile-web-app-capable` with `mobile-web-app-capable`
935
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.18
936
-
937
- ### **v1.9.18**
938
-
939
- - 🐛 **Mobile Touch Event Handling**: Fixed touch listener attachment when calendar opens on mobile devices
940
- - Touch listeners now properly attach when calendar first opens, eliminating the need to navigate months first
941
- - Added retry mechanism with multiple attempts to ensure listeners are attached even on slower mobile devices
942
- - Improved timing with double `requestAnimationFrame` calls and multiple retry strategies
943
- - 🎉 **Version Update**: Updated to version 1.9.18
944
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.17
945
-
946
- ### **v1.9.17**
947
-
948
- - 🎉 **Calendar Button Visibility Control**: Added `showCalendarButton` input property to show/hide the calendar icon button
949
- - Defaults to `false` for a cleaner, more minimal UI
950
- - When set to `true`, displays the calendar icon button next to the input field
951
- - When set to `false`, users can still open the calendar by clicking the input field
952
- - Perfect for custom UI designs or when using `allowTyping` with custom calendar triggers
953
- - 🎨 **Calendar Button Styling**: Added `calendarBtn` to `DatepickerClasses` for custom styling of the calendar button
954
- - 🔧 **Type Compatibility**: Updated `SignalFormField` type to be fully compatible with Angular 21's `FieldTree<Date, string>` types
955
- - Resolves TypeScript compilation issues when using `[field]` input with Angular 21 Signal Forms
956
- - Maintains full backward compatibility with Angular 17-20
957
- - 🎉 **Version Update**: Updated to version 1.9.17
958
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.16
959
- - ✅ **Angular 17-22 Compatible**: Verified compatibility with Angular 17-22 (including Angular 21)
960
-
961
- ### **v1.9.16**
962
-
963
- - 🐛 **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 }`
964
- - 🎉 **Version Update**: Updated to version 1.9.16
965
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.15
966
- - ✅ **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
967
-
968
- ### **v1.9.15**
969
-
970
- - 🐛 **Moment Object Binding Fix**: Fixed Moment.js objects not binding correctly with ngModel
971
- - 🐛 **Date Clicks After Navigation**: Fixed dates becoming unclickable after month navigation
972
- - 🎉 **Version Update**: Updated to version 1.9.15
973
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.14
974
- - ✅ **Angular 17+ Compatible**: Verified compatibility with Angular 17 and up versions
975
-
976
- ### **v1.9.14**
977
-
978
- - 🐛 **Date Picker Selection Fix**: Fixed date picker selection issues, especially in range mode
979
- - 🐛 **Moment.js Timezone Support**: Fixed timezone offset preservation for Moment.js objects
980
- - 🎉 **Version Update**: Updated to version 1.9.14
981
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.13
982
-
983
- ### **v1.9.13**
984
-
985
- - 🐛 **Bug Fixes**: Fixed `valueChange` event emitting null for range mode with ngModel
986
- - 🐛 **Bug Fixes**: Fixed date selection becoming disabled after month navigation in range mode
987
- - 🐛 **Bug Fixes**: Fixed Moment.js object handling in range values and arrays
988
- - 🎉 **Version Update**: Updated to version 1.9.13
989
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.12
990
-
991
- ### **v1.9.12**
992
-
993
- - 🎉 **Version Update**: Updated to version 1.9.12
994
- - 🔄 **Backward Compatible**: Full backward compatibility with v1.9.11
995
- - 📚 **Migration Guide**: See [MIGRATION.md](MIGRATION.md) for detailed migration instructions
996
-
997
- ### **v1.9.11**
998
-
999
- - 🐛 **Moment.js Integration**: Fixed critical issue where Moment.js objects with custom date formats would not populate correctly
1000
- - Added `isMomentObject()` helper method to safely detect Moment.js instances
1001
- - Enhanced `_normalizeValue()` method to handle Moment.js objects directly
1002
- - Improved `parseCustomDateString()` method for TypeScript compatibility
1003
- - Added comprehensive support for format tokens: YYYY, YY, MM, M, DD, D, hh, h, HH, H, mm, m, ss, s, a, A
1004
- - Maintains full backward compatibility with Date objects, strings, and all other supported formats
1005
- - 🎨 **Custom Format Parser**: Enhanced format token parsing with better TypeScript compatibility
1006
- - 🔍 **Moment.js Detection**: More robust detection of Moment.js objects across different versions
1007
- - 🎮 **Demo Application**: Added working Moment.js integration example with interactive controls
1008
-
1009
- ### **v1.9.10**
1010
-
1011
- - 🐛 **Async Database Value Loading**: Enhanced datepicker to properly handle database values that load asynchronously
1012
- - Added fallback sync mechanism in `ngAfterViewInit` to catch async database loads
1013
- - Added delayed sync checks in `ngOnInit`, `ngOnChanges`, and `ngAfterViewInit`
1014
- - Added sync on calendar open, focus events, and touch events
1015
- - Extended interval sync duration to 30 seconds with 100ms check intervals
1016
- - 🔧 **TypeScript Compilation Error**: Fixed `EffectRef` type error when using Angular 17+ `effect()` API
1017
- - Changed `_fieldEffectDestroy: (() => void) | null` to `_fieldEffectRef: EffectRef | null`
1018
- - Updated effect cleanup to use `effectRef.destroy()` instead of function call
1019
- - Added proper `EffectRef` import from `@angular/core`
1020
- - 🧪 **Test Configuration**: Fixed test configuration for Angular 17+ compatibility
1021
- - Updated karma configuration to work with `@angular/build:karma` builder
1022
- - Simplified karma.conf.js to remove deprecated plugins
1023
- - Updated test script to target correct project
1024
-
1025
- ### **v1.9.9**
1026
-
1027
- - 🐛 **Database Value Population**: Fixed critical issue where datepicker would not populate with values from database when using `[field]` input binding
1028
- - Added `_normalizeValue()` helper method to properly handle all value types
1029
- - Updated field effect and related methods to use `_normalizeValue()` instead of `_normalizeDate()`
1030
- - Fixed issue where string dates from database were not being parsed and displayed correctly
1031
- - Now properly handles Date objects, string dates, range objects, and arrays of dates
1032
-
1033
- ### **v1.9.8**
1034
-
1035
- - 🐛 **Date Selection Reset Issue**: Fixed critical bug where selected dates would reset to today's date when using `[field]` input binding
1036
- - Fixed `applyCurrentTime` to create a new Date object instead of mutating the original
1037
- - Added `_isUpdatingFromInternal` flag to prevent field effect from resetting the value
1038
- - This ensures selected dates are properly stored in the form field
1039
-
1040
- ### **v1.9.7**
1041
-
1042
- - 🐛 **Calendar Population**: Fixed critical issue where datepicker calendar would not populate with dates when opened
1043
- - Fixed issue when multiple datepickers were present in the same form
1044
- - Ensured `generateCalendar()` is called when opening the datepicker via click, touch, or programmatic methods
1045
-
1046
- ### **v1.9.6**
1047
-
1048
- - 🐛 **Multiple Datepicker Management**: Fixed issue where multiple datepickers in the same form would open in the same centered location
1049
- - 🖱️ **Outside Click Detection**: Improved click detection to properly close datepicker when clicking outside
1050
- - 🔄 **Auto-close Other Datepickers**: When opening a datepicker, all other open datepickers in the same form are now automatically closed
1051
- - 📱 **Mobile Datepicker Opening**: Fixed issue where datepicker modal would not open on mobile screens
1052
- - 📱 **Datepicker Closing on Mobile**: Fixed issue where datepicker would open and immediately disappear on mobile devices
1053
- - 👆 **Select Box Cursor**: Added pointer cursor to all select boxes (month, year, hour, minute, AM/PM) in the datepicker
1054
-
1055
- ### **v1.9.5**
1056
-
1057
- - 🔧 **Angular 21+ Signal Forms Type Compatibility**: Fixed TypeScript compilation error with Angular 21+ Signal Forms
1058
- - Fixed `Type '() => string' is not assignable to type 'never'` error when using `[field]` input
1059
- - Updated `SignalFormField` type definition to be compatible with Angular 21's `FieldTree<Date, string>` types
1060
- - Maintains backward compatibility with Angular 17-20 where field input is optional
1061
- - Resolves [#33](https://github.com/NGXSMK/ngxsmk-datepicker/issues/33)
1062
-
1063
- ### **v1.9.4**
1064
-
1065
- - ✨ **Custom Date Format**: New `[displayFormat]` input property to display dates in custom formats
1066
- - Supports format strings like "MM/DD/YYYY hh:mm A"
1067
- - Works with date adapters (date-fns, dayjs, luxon) or built-in simple formatter
1068
- - Supports common format tokens: YYYY, MM, DD, hh, mm, A, etc.
1069
- - Resolves [#31](https://github.com/NGXSMK/ngxsmk-datepicker/issues/31)
1070
- - 🐛 **Time Selection Dropdowns**: Fixed visibility issues with time selection dropdowns
1071
- - Dropdowns now properly display and are not clipped by parent containers
1072
- - Improved z-index handling for time selection dropdowns
1073
- - Removed unnecessary scrollbars from datepicker wrapper
1074
- - Resolves [#32](https://github.com/NGXSMK/ngxsmk-datepicker/issues/32)
1075
-
1076
- ### **v1.9.3**
1077
-
1078
- - ✨ **Time-Only Picker**: New `[timeOnly]` input property to display only time selection without calendar
1079
- - Hides calendar grid and shows only time controls (hour, minute, AM/PM)
1080
- - Automatically enables `showTime` when `timeOnly` is true
1081
- - Perfect for time selection scenarios where date is not needed
1082
- - Value is still a Date object using today's date with selected time
1083
- - Placeholder automatically changes to "Select Time" in time-only mode
1084
- - Resolves [#29](https://github.com/NGXSMK/ngxsmk-datepicker/issues/29)
1085
- - 🎨 **Modern Demo App UI**: Complete redesign of the demo application
1086
- - Modern navbar with glassmorphism effects, search functionality, and improved theme toggle
1087
- - Redesigned sidebar with gradient backgrounds, smooth animations, and visual indicators
1088
- - Enhanced icon sizes and better visual hierarchy
1089
- - Improved responsive design with better mobile experience
1090
- - Automatic system theme detection (dark/light mode preference)
1091
- - Gradient accents, shadows, and modern design patterns throughout
1092
- - 🧪 **Test Suite**: Fixed 25+ failing tests across multiple test files
1093
- - Fixed date utils tests, calendar utils tests, timezone utils tests, edge cases tests
1094
- - Fixed adapters tests, performance utils tests, RTL tests, touch gestures tests
1095
- - Fixed calendar views tests, recurring dates utils tests
1096
- - All 353 tests now pass successfully
1097
-
1098
- ### **v1.9.2**
1099
-
1100
- - 📦 **Bundle Optimization**: Optimized bundle size with improved TypeScript compiler settings
1101
- - Main bundle: ~127KB (source maps excluded from published package)
1102
- - Enhanced tree-shaking with optimized imports and compiler options
1103
- - Added `importsNotUsedAsValues: "remove"` for smaller output
1104
- - Disabled `preserveConstEnums` for better inlining
1105
- - 🔧 **Build Process**:
1106
- - Source maps automatically removed from production builds (saves ~127KB)
1107
- - Improved build scripts with better error handling
1108
- - Enhanced bundle analysis that excludes source maps
1109
- - 📦 **Package Configuration**:
1110
- - Fixed package.json exports to eliminate build warnings
1111
- - Optimized `files` array to exclude unnecessary files
1112
- - Updated exports field for better module resolution
1113
- - 🧪 **Test Configuration**:
1114
- - Added Zone.js polyfills to library test configuration
1115
- - Updated test commands to explicitly target library project
1116
- - Improved test reliability across Angular versions
1117
- - 🐛 **Bug Fixes**:
1118
- - Test suite configuration - added missing Zone.js polyfills for library tests
1119
- - Bundle analysis now correctly excludes source maps from size calculations
1120
- - Build warnings from conflicting export conditions resolved
1121
- - Source map removal script made more resilient for build environments
1122
-
1123
- ### **v1.9.1**
1124
-
1125
- - 🐛 Minor bug fixes and improvements
1126
-
1127
- ### **v1.9.0**
1128
-
1129
- - ✨ **Extension Points & Hooks**: system for customization
1130
- - ⌨️ **Enhanced Keyboard Shortcuts**: Y, N, W keys with custom shortcut support
1131
- - 🎨 **Modern UI/UX**: Improved animations and responsiveness
1132
- - 📚 **API Documentation**: TypeDoc integration
1133
- - 🤖 **Semantic Release**: Automated versioning and publishing
1134
- - 🚀 **Animation Performance**: Optimizations with GPU acceleration
1135
- - 🔍 **Global Search**: Functionality in documentation
1136
- - 📱 **Mobile Playground**: For responsive testing
1137
-
1138
- ### **v1.7.0**
1139
-
1140
- - 🎯 **Signal Forms Support**: Full Angular 21 signal forms integration with writable signals
1141
- - 🎨 **Tailwind Theming**: Added `classes` input for Tailwind CSS and custom class-based theming
1142
- - 🌍 **Localization Improvements**: Added `weekStart` input to override locale-based week start day
1143
- - 📅 **Year Range Configuration**: Added `yearRange` input to customize year dropdown range
1144
- - ♿ **Accessibility Enhancements**: Added customizable aria labels for all interactive elements
1145
- - 🏷️ **Custom Labels**: Added `clearLabel` and `closeLabel` inputs for button customization
1146
- - 🧪 **Comprehensive Test Suite**: Added 56 tests covering all features and edge cases
1147
- - 🐛 **Bug Fixes**: Fixed programmatic value setting and Angular 21 compatibility tests
1148
- - 🧹 **Code Cleanup**: Removed unnecessary files, folders, and comments from codebase
1149
- - 📝 **Test Improvements**: Enhanced test coverage with comprehensive feature tests
1150
- - 🔧 **Test Fixes**: Fixed disabled date tests and integration test issues
1151
- - 🎯 **Code Quality**: Improved code maintainability by removing redundant comments
1152
-
1153
- ### **v1.6.0**
1154
-
1155
- - 🎯 **Programmatic Value Setting**: Added `value` input property to set datepicker value programmatically, perfect for server-side API data integration
1156
- - 🎨 **Enhanced Demo App**: Completely redesigned demo application with TokiForge-inspired modern UI and API documentation style
1157
- - 🚀 **GitHub Pages Deployment**: Added automated GitHub Pages deployment with GitHub Actions workflow
1158
- - 📚 **Improved Documentation**: Enhanced demo app with comprehensive examples, code snippets, and interactive documentation
1159
- - 🔧 **Build Optimizations**: Updated CSS budget limits and improved build configuration
1160
- - 🎨 **Modern UI Design**: Beautiful gradient themes, glass-morphism effects, and improved visual hierarchy
1161
- - 📱 **Better UX**: Enhanced navigation, code copying functionality, and responsive design
1162
- - 🛠️ **Developer Experience**: Improved build scripts and deployment automation
1163
-
1164
- ### **v1.5.0**
1165
-
1166
- - 🚀 **Angular 21 Support**: Full compatibility with Angular 21 RC versions
1167
- - ⚡ **Zone-less Support**: Works without zone.js for improved performance
1168
- - 🧪 **Comprehensive Tests**: Added extensive test suite covering all features
1169
- - 🔧 **Angular 17-21 Compatibility**: Supports Angular versions 17, 18, 19, 20, and 21
1170
- - 📦 **Dependency Updates**: Updated to Angular 21 RC and latest build tools
1171
- - 🧹 **Code Cleanup**: Removed unnecessary documentation files and comments
1172
- - 📝 **Improved Keywords**: Added version-specific keywords for better discoverability
1173
- - 🎯 **Peer Dependencies**: Updated to support Angular 17-21 range
1174
-
1175
- ### **v1.4.16**
1176
-
1177
- - 📚 **Documentation**: Comprehensive README updates with latest features and improvements
1178
- - 🎯 **Version Management**: Updated version references across all package files
1179
- - 📖 **User Experience**: Enhanced documentation with better examples and API references
1180
- - 🔧 **Maintenance**: Improved project structure and documentation consistency
1181
- - 📦 **Package Updates**: Synchronized version numbers across all package.json files
1182
- - 🎨 **Documentation**: Added detailed bug fixes and performance metrics
1183
- - 🚀 **Developer Experience**: Better setup instructions and contribution guidelines
1184
-
1185
- ### **v1.4.15**
1186
-
1187
- - 🐛 **Bug Fixes**: Fixed 10 critical bugs including change detection issues and date comparison errors
1188
- - ⚡ **Performance**: Enhanced OnPush change detection with proper triggers
1189
- - 🎯 **Memory Management**: Added cache size limits to prevent memory leaks
1190
- - 🔧 **Type Safety**: Improved TypeScript types and null safety
1191
- - 📱 **Mobile Optimization**: Enhanced mobile responsive design with touch-friendly interactions
1192
- - 🎨 **UI Improvements**: Better visual feedback and accessibility
1193
- - 🚀 **Build Optimization**: Improved build configuration and tree-shaking
1194
- - 🧹 **Code Quality**: Enhanced code maintainability and performance
1195
-
1196
- ### **v1.4.13**
1197
-
1198
- - 🚫 **Disabled Dates**: New `disabledDates` input property to disable specific dates
1199
- - 🎯 **Date String Support**: Supports both string dates (MM/DD/YYYY) and Date objects
1200
- - 💡 **Holiday Tooltips**: Hover over holiday dates to see holiday names as tooltips
1201
- - 🎨 **Enhanced UX**: Better visual feedback for disabled dates
1202
- - 📦 **Improved API**: More flexible date disabling options
1203
-
1204
- ### **v1.4.12**
1205
-
1206
- - ⚡ **Instant Navigation**: Removed all animations for lightning-fast arrow navigation
1207
- - 🚫 **Smart Back Arrow**: Automatically disables back arrow when minDate is set
1208
- - 🎯 **Better UX**: Prevents navigation to invalid date ranges
1209
- - 🗓️ **Previous Month Days**: Now shows last few days of previous month for better context
1210
- - 🎨 **Enhanced Styling**: Improved visual hierarchy with better day cell sizing
1211
- - 🖱️ **Interactive Previous Days**: Previous month days are now selectable and interactive
1212
- - 🧹 **Code Optimization**: Cleaner, more maintainable codebase
1213
- - 📦 **Smaller Bundle**: Reduced CSS and JavaScript footprint
1214
-
1215
- ### **v1.4.11**
1216
-
1217
- - 🎨 **UI Improvements**: Enhanced day cell sizing and visual hierarchy
1218
- - 🖱️ **Better Interactions**: Improved click and hover states for previous month days
1219
-
1220
- ### **v1.4.10**
1221
-
1222
- - 🗓️ **Previous Month Display**: Added last few days of previous month for better context
1223
- - 🎯 **Smart Selection**: Previous month days are now selectable and interactive
1224
-
1225
- ### **v1.4.9**
1226
-
1227
- - 🚫 **Range Fix**: Fixed range highlighting on empty/previous month days
1228
- - 🎨 **Styling Updates**: Improved visual consistency across all day types
1229
-
1230
- ### **v1.4.8**
1231
-
1232
- - ⚡ **Performance**: Optimized calendar generation and rendering
1233
- - 🧹 **Code Cleanup**: Removed unused animation code and improved maintainability
1234
-
1235
- ### **v1.4.6**
1236
-
1237
- - 🔧 **Fixed Import Paths**: Corrected package exports for proper module resolution
1238
- - 📦 **Better Package Structure**: Improved npm package configuration
1239
-
1240
- ### **v1.4.5**
1241
-
1242
- - 🐛 Bug fixes and stability improvements
1243
- - 🔧 Enhanced error handling
1244
- - 📱 Improved mobile responsiveness
1245
- - 🎨 Minor UI/UX improvements
1246
-
1247
- ### **v1.4.0**
860
+ ### **Earlier Versions**
1248
861
 
1249
- - Performance optimizations (30% smaller bundle)
1250
- - ✅ OnPush change detection strategy
1251
- - ✅ Memoized date comparisons
1252
- - ✅ Tree-shakable architecture
1253
- - ✅ Enhanced TypeScript support
1254
- - ✅ Improved accessibility
1255
- - ✅ Better mobile responsiveness
1256
-
1257
- ### **Previous Versions**
1258
-
1259
- - v1.3.5: Initial release with core features
1260
- - v1.3.4: Bug fixes and improvements
1261
- - v1.3.3: Holiday provider integration
862
+ For older version details, please refer to the [full CHANGELOG.md](https://github.com/NGXSMK/ngxsmk-datepicker/blob/main/CHANGELOG.md).
1262
863
 
1263
864
  ## **🎨 Theming with TokiForge**
1264
865
 
@@ -7226,7 +7226,6 @@ class CustomDateFormatService {
7226
7226
  if (!date) {
7227
7227
  return '';
7228
7228
  }
7229
- let result = pattern;
7230
7229
  const year = date.getFullYear();
7231
7230
  const month = date.getMonth();
7232
7231
  const dayOfMonth = date.getDate();
@@ -7238,36 +7237,30 @@ class CustomDateFormatService {
7238
7237
  const isAM = hours24 < 12;
7239
7238
  const monthNames = this.getMonthNames();
7240
7239
  const weekdayNames = this.getWeekdayNames();
7241
- // Year
7242
- result = result.replace(/YYYY/g, year.toString());
7243
- result = result.replace(/YY/g, year.toString().slice(-2));
7244
- // Month
7245
- result = result.replace(/MMMM/g, monthNames.full[month] || '');
7246
- result = result.replace(/MMM/g, monthNames.abbreviated[month] || '');
7247
- result = result.replace(/MM/g, (month + 1).toString().padStart(2, '0'));
7248
- result = result.replace(/M(?!M)/g, (month + 1).toString());
7249
- // Weekday
7250
- result = result.replace(/DDDD/g, weekdayNames.full[dayOfWeek] || '');
7251
- result = result.replace(/DDD/g, weekdayNames.abbreviated[dayOfWeek] || '');
7252
- // Day
7253
- result = result.replace(/DD/g, dayOfMonth.toString().padStart(2, '0'));
7254
- result = result.replace(/D(?!D)/g, dayOfMonth.toString());
7255
- // Hour (24-hour format)
7256
- result = result.replace(/HH/g, hours24.toString().padStart(2, '0'));
7257
- result = result.replace(/H(?!H)/g, hours24.toString());
7258
- // Hour (12-hour format)
7259
- result = result.replace(/hh/g, hours12.toString().padStart(2, '0'));
7260
- result = result.replace(/h(?!h)/g, hours12.toString());
7261
- // Minutes
7262
- result = result.replace(/mm/g, minutes.toString().padStart(2, '0'));
7263
- result = result.replace(/m(?!m)/g, minutes.toString());
7264
- // Seconds
7265
- result = result.replace(/ss/g, seconds.toString().padStart(2, '0'));
7266
- result = result.replace(/s(?!s)/g, seconds.toString());
7267
- // AM/PM
7268
- result = result.replace(/A/g, isAM ? 'AM' : 'PM');
7269
- result = result.replace(/a/g, isAM ? 'am' : 'pm');
7270
- return result;
7240
+ const replacements = {
7241
+ 'YYYY': year.toString(),
7242
+ 'YY': year.toString().slice(-2),
7243
+ 'MMMM': monthNames.full[month] || '',
7244
+ 'MMM': monthNames.abbreviated[month] || '',
7245
+ 'MM': (month + 1).toString().padStart(2, '0'),
7246
+ 'M': (month + 1).toString(),
7247
+ 'DDDD': weekdayNames.full[dayOfWeek] || '',
7248
+ 'DDD': weekdayNames.abbreviated[dayOfWeek] || '',
7249
+ 'DD': dayOfMonth.toString().padStart(2, '0'),
7250
+ 'D': dayOfMonth.toString(),
7251
+ 'HH': hours24.toString().padStart(2, '0'),
7252
+ 'H': hours24.toString(),
7253
+ 'hh': hours12.toString().padStart(2, '0'),
7254
+ 'h': hours12.toString(),
7255
+ 'mm': minutes.toString().padStart(2, '0'),
7256
+ 'm': minutes.toString(),
7257
+ 'ss': seconds.toString().padStart(2, '0'),
7258
+ 's': seconds.toString(),
7259
+ 'A': isAM ? 'AM' : 'PM',
7260
+ 'a': isAM ? 'am' : 'pm',
7261
+ };
7262
+ const regex = /YYYY|YY|MMMM|MMM|MM|M|DDDD|DDD|DD|D|HH|H|hh|h|mm|m|ss|s|[Aa]/g;
7263
+ return pattern.replaceAll(regex, (match) => replacements[match] || match);
7271
7264
  }
7272
7265
  /**
7273
7266
  * Parse a formatted date string back to a Date object
@@ -7282,7 +7275,7 @@ class CustomDateFormatService {
7282
7275
  // For now, use basic date parsing as full pattern parsing is complex
7283
7276
  // This can be enhanced in the future to support full pattern parsing
7284
7277
  const date = new Date(dateString);
7285
- return isNaN(date.getTime()) ? null : date;
7278
+ return Number.isNaN(date.getTime()) ? null : date;
7286
7279
  }
7287
7280
  catch {
7288
7281
  return null;
@@ -7313,9 +7306,7 @@ class CustomDateFormatService {
7313
7306
  getWeekdayNames() {
7314
7307
  if (!this.weekdayNames.has(this.locale)) {
7315
7308
  const weekdays = Array.from({ length: 7 }).map((_, i) => {
7316
- // Use Monday-based calculation, then convert to Sunday-first
7317
- const dayIndex = (i + 1) % 7;
7318
- const date = new Date(2000, 0, 2 + dayIndex); // Start from Sunday, Jan 2, 2000
7309
+ const date = new Date(2000, 0, 2 + i); // Jan 2, 2000 was a Sunday
7319
7310
  return {
7320
7311
  full: date.toLocaleDateString(this.locale, { weekday: 'long' }),
7321
7312
  abbreviated: date.toLocaleDateString(this.locale, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngxsmk-datepicker",
3
- "version": "2.2.8",
3
+ "version": "2.2.11",
4
4
  "author": {
5
5
  "name": "Sachin Dilshan",
6
6
  "url": "https://www.linkedin.com/in/sachindilshan/"
@@ -80,15 +80,16 @@
80
80
  },
81
81
  "prepublishOnly": "node ../../scripts/assert-lib-publish-artifacts.cjs",
82
82
  "exports": {
83
+ ".": {
84
+ "types": "./types/ngxsmk-datepicker.d.ts",
85
+ "import": "./fesm2022/ngxsmk-datepicker.mjs",
86
+ "default": "./fesm2022/ngxsmk-datepicker.mjs"
87
+ },
83
88
  "./styles/*": {
84
89
  "default": "./styles/*"
85
90
  },
86
91
  "./package.json": {
87
92
  "default": "./package.json"
88
- },
89
- ".": {
90
- "types": "./types/ngxsmk-datepicker.d.ts",
91
- "default": "./fesm2022/ngxsmk-datepicker.mjs"
92
93
  }
93
94
  }
94
95
  }