Releases: lanxuexing/ngx-laydate
Releases · lanxuexing/ngx-laydate
v16.1.1
16.1.1 (2026-01-23)
🐛 Bug Fixes
- directive: fix initialization error
TypeError: this.ngLaydate.render is not a function- Added a robust fallback to
window.laydatefor environments where the dynamic import oflayui-laydatedoes not export the module correctly. - Ensures compatibility with both SSR and standard browser builds where
layui-laydatemight attach itself to the global scope.
- Added a robust fallback to
🔧 Maintenance
- deps: bump version to 16.1.1
Full Changelog: v16.1.0...v16.1.1
v16.1.0
🚀 v16.010: Modernization, SSR Support & Performance
This major release brings ngx-laydate into the modern Angular era! We've fully refactored the core to support Standalone components, Server-Side Rendering (SSR), and incorporated significant performance and stability improvements.
✨ Highlights
🚄 Standalone & Modern Angular
- Standalone Directive: NgxLaydateDirective is now
standalone: true. You can import it directly in your components withoutNgModules. - Modern DI: Refactored to use
inject()andDestroyReffor cleaner, more robust dependency injection and lifecycle management.
🌏 Server-Side Rendering (SSR) Support
- Full SSR Compatibility: Added platform guards (
isPlatformBrowser) to strictly separate browser-only logic. - Safe Initialization: The directive now properly detects the server environment and prevents DOM-dependent
laydatelogic from executing, ensuring your Angular Universal apps render without crashing.
⚡ Performance Optimization
- Smart Loader Caching: Implemented a singleton caching mechanism for the
laydatelibrary loader. No matter how many date pickers you have on a page, the library resource will only be requested once.
🛠 Improvements & Refactoring
- Direct DOM Updates: Fixed writeValue to use
Renderer2for direct and safe DOM value updates, improving reliability. - Instance Isolation: Explicitly scoped the
laydateconfiguration (elem) to the specific directive instance, preventing conflicts when multiple pickers are present. - Module Cleanup: Removed redundant
FormsModuledependencies from NgxLaydateModule. - Better Types: Improved internal typing and public API exports.
📝 Documentation
- Brand New Design: Completely overhauled README.md and README-zh_CN.md with a modern aesthetic, clearer usage examples, and bilingual support.
- CI/CD: Added automated GitHub Actions workflows for deploying the demo site and publishing releases to npm.
📦 Upgrading
For Standalone Users (Recommended)
import { NgxLaydateDirective } from 'ngx-laydate';
@Component({
standalone: true,
imports: [NgxLaydateDirective],
// ...
})Full Changelog: 16.0.2...v16.1.0
v16.0.2
What's Changed
- Supports ngModel and formControlName 🚀
v15.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v14.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v13.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v.12.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v11.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v10.0.1
What's Changed
- Supports ngModel and formControlName 🚀
v16.0.0
What's Changed
- Supports Angular v16 🚀