{"action":"created","issue":{"url":"https://api.github.com/repos/marmelab/ng-admin/issues/1271","repository_url":"https://api.github.com/repos/marmelab/ng-admin","labels_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1271/labels{/name}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1271/comments","events_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1271/events","html_url":"https://github.com/marmelab/ng-admin/issues/1271","id":194384861,"number":1271,"title":"editionView() returns date decremented by 1 day","user":{"login":"wannarka","id":4563296,"avatar_url":"https://avatars.githubusercontent.com/u/4563296?v=3","gravatar_id":"","url":"https://api.github.com/users/wannarka","html_url":"https://github.com/wannarka","followers_url":"https://api.github.com/users/wannarka/followers","following_url":"https://api.github.com/users/wannarka/following{/other_user}","gists_url":"https://api.github.com/users/wannarka/gists{/gist_id}","starred_url":"https://api.github.com/users/wannarka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wannarka/subscriptions","organizations_url":"https://api.github.com/users/wannarka/orgs","repos_url":"https://api.github.com/users/wannarka/repos","events_url":"https://api.github.com/users/wannarka/events{/privacy}","received_events_url":"https://api.github.com/users/wannarka/received_events","type":"User","site_admin":false},"labels":[{"id":101480995,"url":"https://api.github.com/repos/marmelab/ng-admin/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-12-08T16:42:39Z","updated_at":"2016-12-21T22:28:23Z","closed_at":null,"body":"### Description\r\n\r\nIn my index.js:\r\n```\r\nproject.editionView().fields([\r\n         nga.field('devdate', 'date')\r\n           .format('MM-dd-yyyy')\r\n           .label('Development Date'),\r\n    ]);\r\n```\r\nThe day (dd) is decremented by 1 but the above works fine (displays the correct `devdate` response) in `project.creationView().fields`. \r\n\r\n### Steps to Reproduce\r\nPlunkr: http://plnkr.co/edit/M70PbzPLBCGVZ9dollvj?p=preview\r\n\r\n1. Select 'Projects' in the left hand pane\r\n2. Select 'Id' of any of the projects in the Project List; notice the 'Dev Date'\r\n3. Now in the Edit Project form, the 'Development Date' displays decremented by 1 day\r\n4. If user chooses to save, the 'Dev Date' will be stored in the db incorrectly.\r\n\r\nI've tried it with and without the `.format` and `.label` with the same results. Again, creationView works just fine. And the datepicker requests with the `devdate:\"2016-12-08\"` so it is stored in the database accurately.\r\n\r\n**Expected behavior:** Display 12-08-2016\r\n\r\n**Actual behavior:** Displays 12-07-2016\r\n"},"comment":{"url":"https://api.github.com/repos/marmelab/ng-admin/issues/comments/268660023","html_url":"https://github.com/marmelab/ng-admin/issues/1271#issuecomment-268660023","issue_url":"https://api.github.com/repos/marmelab/ng-admin/issues/1271","id":268660023,"user":{"login":"wannarka","id":4563296,"avatar_url":"https://avatars.githubusercontent.com/u/4563296?v=3","gravatar_id":"","url":"https://api.github.com/users/wannarka","html_url":"https://github.com/wannarka","followers_url":"https://api.github.com/users/wannarka/followers","following_url":"https://api.github.com/users/wannarka/following{/other_user}","gists_url":"https://api.github.com/users/wannarka/gists{/gist_id}","starred_url":"https://api.github.com/users/wannarka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wannarka/subscriptions","organizations_url":"https://api.github.com/users/wannarka/orgs","repos_url":"https://api.github.com/users/wannarka/repos","events_url":"https://api.github.com/users/wannarka/events{/privacy}","received_events_url":"https://api.github.com/users/wannarka/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T22:28:23Z","updated_at":"2016-12-21T22:28:23Z","body":"Changing the datepicker config will not address the issue either. I traced the code down and the #devDate value is \"2016-12-06\" before the input-group datepicker class is called. As we have already established, the devDate is correct (\"2016-12-07\") coming from the API in the browser and also correct in the creationView.  My best guess is it is getting changed by ng-admin-field-devDate."}}
{"actor":{"display_login":"wannarka"}}