EDIT:
I finally found a solution. It is a bit complicated, but it works. Here is the directive:
app.directive("autoOpen", ["$parse", function($parse) {
return {
link: function(scope, iElement, iAttrs) {
var isolatedScope = iElement.isolateScope();
iElement.on("focus", function() {
isolatedScope.$apply(function() {
$parse("isOpen").assign(isolatedScope, "true");
});
});
}
};
}]);
And this view:
<input type="text" datepicker-popup="" ng-model="ctrl.dt" auto-open />
This is an old solution:
, is-open, :
app.directive("autoOpen", ["$parse", function($parse) {
return {
link: function(scope, iElement, iAttrs) {
var isOpenVarName = iAttrs.isOpen;
iElement.on("focus", function() {
$scope.$apply(function() {
$parse(isOpenVarName).assign(scope, "true");
});
});
}
};
}]);
:
<input type="text" datepicker-popup="" auto-open is-open="open" ng-model="ctrl.dt" />
, open is-open="open" . , . , .
: Akos-lukacs, angular.