{"action":"created","issue":{"url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/84","labels_url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/84/comments","events_url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/84/events","html_url":"https://github.com/zhaber/angular-js-bootstrap-datetimepicker/issues/84","id":129980196,"number":84,"title":"date-format cannot be set by code","user":{"login":"rosieks","id":1107959,"avatar_url":"https://avatars.githubusercontent.com/u/1107959?v=3","gravatar_id":"","url":"https://api.github.com/users/rosieks","html_url":"https://github.com/rosieks","followers_url":"https://api.github.com/users/rosieks/followers","following_url":"https://api.github.com/users/rosieks/following{/other_user}","gists_url":"https://api.github.com/users/rosieks/gists{/gist_id}","starred_url":"https://api.github.com/users/rosieks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosieks/subscriptions","organizations_url":"https://api.github.com/users/rosieks/orgs","repos_url":"https://api.github.com/users/rosieks/repos","events_url":"https://api.github.com/users/rosieks/events{/privacy}","received_events_url":"https://api.github.com/users/rosieks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-30T12:10:41Z","updated_at":"2016-01-31T08:29:07Z","closed_at":null,"body":"I'm just trying to set `date-format` from code so I have something like this:\r\n\r\n`<datetimepicker ng-model=\"ride.departure\" show-meridian=\"false\" date-format=\"{{vm.dateFormat}}\" />`\r\n\r\nUnfortunately in such case I receive the following error:\r\n\r\n    Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 2 of the expression  [{{vm.dateFormat}}] starting at [{vm.dateFormat}}].\r\n    http://errors.angularjs.org/1.4.8/$parse/syntax?p0=%7B&p1=invalid%20key&p2=2&p3=%7B%7Bvm.dateFormat%7D%7D&p4=%7Bvm.dateFormat%7D%7D\r\n        at http://localhost:3000/bower_components/angular/angular.js:68:12\r\n        at Object.AST.throwError (http://localhost:3000/bower_components/angular/angular.js:13100:11)\r\n        at Object.AST.object (http://localhost:3000/bower_components/angular/angular.js:13087:16)\r\n        at Object.AST.primary (http://localhost:3000/bower_components/angular/angular.js:12995:22)\r\n        at Object.AST.unary (http://localhost:3000/bower_components/angular/angular.js:12983:19)\r\n        at Object.AST.multiplicative (http://localhost:3000/bower_components/angular/angular.js:12970:21)\r\n        at Object.AST.additive (http://localhost:3000/bower_components/angular/angular.js:12961:21)\r\n        at Object.AST.relational (http://localhost:3000/bower_components/angular/angular.js:12952:21)\r\n        at Object.AST.equality (http://localhost:3000/bower_components/angular/angular.js:12943:21)\r\n        at Object.AST.logicalAND (http://localhost:3000/bower_components/angular/angular.js:12935:21) <div ng-show=\"inEditMode()\" ng-transclude=\"\">\r\n\r\nIt also fails if I change code in demo from `date-format=\"yyyy-MMM-dd\"` to `date-format=\"{{'yyyy-MMM-dd'}}\"`"},"comment":{"url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/comments/177430949","html_url":"https://github.com/zhaber/angular-js-bootstrap-datetimepicker/issues/84#issuecomment-177430949","issue_url":"https://api.github.com/repos/zhaber/angular-js-bootstrap-datetimepicker/issues/84","id":177430949,"user":{"login":"rosieks","id":1107959,"avatar_url":"https://avatars.githubusercontent.com/u/1107959?v=3","gravatar_id":"","url":"https://api.github.com/users/rosieks","html_url":"https://github.com/rosieks","followers_url":"https://api.github.com/users/rosieks/followers","following_url":"https://api.github.com/users/rosieks/following{/other_user}","gists_url":"https://api.github.com/users/rosieks/gists{/gist_id}","starred_url":"https://api.github.com/users/rosieks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosieks/subscriptions","organizations_url":"https://api.github.com/users/rosieks/orgs","repos_url":"https://api.github.com/users/rosieks/repos","events_url":"https://api.github.com/users/rosieks/events{/privacy}","received_events_url":"https://api.github.com/users/rosieks/received_events","type":"User","site_admin":false},"created_at":"2016-01-31T08:29:07Z","updated_at":"2016-01-31T08:29:07Z","body":"That's true, but it should be able to use interpolation to have some computed format like it's in datepicker directive.\r\nBelow is sample from Angular UI Bootstrap site:\r\n\r\n```<input type=\"text\" class=\"form-control\" uib-datepicker-popup=\"{{format}}\" ng-model=\"dt\" is-open=\"popup1.opened\" min-date=\"minDate\" max-date=\"maxDate\" datepicker-options=\"dateOptions\" date-disabled=\"disabled(date, mode)\" ng-required=\"true\" close-text=\"Close\" alt-input-formats=\"altInputFormats\" />```\r\n\r\nAs you see there is `uib-datepicker-popup=\"{{format}}\"` that let me compute format."}}