Skip to content

Releases: lanxuexing/ngx-laydate

v16.1.1

22 Jan 17:00

Choose a tag to compare

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.laydate for environments where the dynamic import of layui-laydate does not export the module correctly.
    • Ensures compatibility with both SSR and standard browser builds where layui-laydate might attach itself to the global scope.

🔧 Maintenance

  • deps: bump version to 16.1.1

Full Changelog: v16.1.0...v16.1.1

v16.1.0

21 Jan 17:31

Choose a tag to compare

🚀 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 without NgModules.
  • Modern DI: Refactored to use inject() and DestroyRef for 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 laydate logic from executing, ensuring your Angular Universal apps render without crashing.

⚡ Performance Optimization

  • Smart Loader Caching: Implemented a singleton caching mechanism for the laydate library 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 Renderer2 for direct and safe DOM value updates, improving reliability.
  • Instance Isolation: Explicitly scoped the laydate configuration (elem) to the specific directive instance, preventing conflicts when multiple pickers are present.
  • Module Cleanup: Removed redundant FormsModule dependencies 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

23 Jun 12:30

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v15.0.1

23 Jun 14:17

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v14.0.1

23 Jun 14:58

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v13.0.1

23 Jun 14:58

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v.12.0.1

23 Jun 15:13

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v11.0.1

23 Jun 23:59

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v10.0.1

24 Jun 00:00

Choose a tag to compare

What's Changed

  • Supports ngModel and formControlName 🚀

v16.0.0

13 Jun 16:52

Choose a tag to compare

What's Changed

  • Supports Angular v16 🚀