Datepicker-popup formatting not working when value set initially in scope
问题 I am using the Angular UI bootstrap date picker popup using this custom directive on Plunker (http://plnkr.co/edit/053VJYm1MpZUiKwFTfrT?p=preview): //Module var userModule = angular.module("userModule",['ui.bootstrap']); //Controller userModule.controller("sampleController", ['$scope', function ($scope) { $scope.minDate = new Date(); }]); //Directive code userModule.directive('datePicker', [function (dateFilter) { return { restrict: 'E', require: 'ngModel', scope: { ngModel: '=', ngReadonly: