jQuery UI Datepicker AngularJS Directive using Min Max Options

In an Angularjs project, if you are trying to add a datepicker having all features like MinDate MaxDate etc, you will hardly find any module which is performance efficient, bug-free and is requirement friendly like jQuery UI datepicker.

So, If you are looking to use jQuery Datepicker as a directive in your AngularJS project, then believe me at present it will be a great option available which is fast, healthy and powerpack with huge options.

here I am going to share with you datepicker directive with basic options only like MinDate, MaxDate and default date, But as per requirement you can follow the same procedure to add more option in the directive.

Libraries required:

You will need to add jQuery and jQuery UI with AngularJs to use this directive. We are using datepicker() method of jQuery UI.

Visit demo page here

Directive above is using event handling by binding a watch listener for min and max dates to make it work with AngularJs life cycle.

Full code snippets used in the demo page.










Leave a Reply

Notify of