Add jquery date picker in angular

By user7397787

I am trying to display jquery date picker in angular,but am getting error as element.datepicker is not a function.

<form ng-app="myApp" ng-controller="myCtrl">
            <label>Date<span class="requiredField">*</span></label>
            <input type="text" id="levFrom" datepicker ng-model="leave.from_date"  required>
    var app = angular
                    .module("myApp", [])
                    .directive("datepicker", function () {
                        function link(scope, element, attrs) {
                                dateFormat: "dd/mm/yy"
                        return {
                            require: 'ngModel',
                            link: link
                    .controller("myCtrl", function ($scope, $http, $timeout) {

whats wrong in my code?

Source: Stack Overflow


Share it with your friends!

    Fatal error: Uncaught Exception: 12: REST API is deprecated for versions v2.1 and higher (12) thrown in /home/content/19/9652219/html/wp-content/plugins/seo-facebook-comments/facebook/base_facebook.php on line 1273