Lets take a look to my directive:
angular.module(\'main\').directive(\'datepicker\', [ function() { return { require: \'?ngModel\', link:
This works for a DatePicker on my site
DatePicker
link: function(scope, elem, attrs, ngModel) { scope.$apply(function(){ ngModel.$viewValue = value; } }