{"action":"opened","issue":{"url":"https://api.github.com/repos/ulaval/modul-components/issues/265","repository_url":"https://api.github.com/repos/ulaval/modul-components","labels_url":"https://api.github.com/repos/ulaval/modul-components/issues/265/labels{/name}","comments_url":"https://api.github.com/repos/ulaval/modul-components/issues/265/comments","events_url":"https://api.github.com/repos/ulaval/modul-components/issues/265/events","html_url":"https://github.com/ulaval/modul-components/issues/265","id":325868300,"number":265,"title":"MDatePicker does not render programmatically assigned value","user":{"login":"Gehbrial","id":9321998,"avatar_url":"https://avatars3.githubusercontent.com/u/9321998?v=4","gravatar_id":"","url":"https://api.github.com/users/Gehbrial","html_url":"https://github.com/Gehbrial","followers_url":"https://api.github.com/users/Gehbrial/followers","following_url":"https://api.github.com/users/Gehbrial/following{/other_user}","gists_url":"https://api.github.com/users/Gehbrial/gists{/gist_id}","starred_url":"https://api.github.com/users/Gehbrial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gehbrial/subscriptions","organizations_url":"https://api.github.com/users/Gehbrial/orgs","repos_url":"https://api.github.com/users/Gehbrial/repos","events_url":"https://api.github.com/users/Gehbrial/events{/privacy}","received_events_url":"https://api.github.com/users/Gehbrial/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T20:50:12Z","updated_at":"2018-05-23T20:50:12Z","closed_at":null,"author_association":"NONE","body":"## `@ulaval/modul-components`\r\n# Issue Checklist\r\n\r\n<!--\r\nPlease review the contribution guidelines: https://github.com/ulaval/modul-components/blob/develop/.github/CONTRIBUTING.md.\r\n-->\r\n\r\n<!--\r\nUpdate \"[ ]\" to \"[x]\" to check a box\r\nContent can be written in English or in French\r\n-->\r\n\r\n<!-- REQUIRED -->\r\n- [ x] Provide a description of the issue\r\n<!-- Description here... -->\r\nLors de l'initialisation du component _m-datepicker_, la date passée au prop _value_ n'est pas affichée dans l'input. En effet, on doit forcer la mise à jour via l'interface. On peut régler le problème de la façon suivante:\r\n\r\n_datepicker.js_\r\n```\r\n    MDatepicker.prototype.created = function () {\r\n        moment.locale([this.$i18n.currentLang(), 'en-ca']);\r\n        this.selectedMomentDate = this.valueIsValid() ? moment(this.value) : moment();\r\n\r\n        + if(this.value && this.valueIsValid()) {\r\n        +   this.as().internalValue = this.value;\r\n        + }\r\n    };\r\n```\r\nIf submitting a bug\r\n- [x ] Provide a step by step way to reproduce the problem with screenshot or video\r\n<!-- Steps here... -->\r\n_component.ts_\r\n```\r\nimport moment from 'moment';\r\n\r\n@WithRender\r\n@Component\r\nexport default class Component extends props {\r\n    data: Object = {\r\n        billingDate: moment()\r\n    }\r\n}\r\n```\r\n\r\n_component.html_\r\n```\r\n<div>\r\n    <m-datepicker :value=\"data.billingDate\" label=\"Billing date\"></m-datepicker>\r\n</div>\r\n```\r\n- [ x] Provide the expected behaviour\r\n<!-- Expected behaviour here... -->\r\nOn devrait initialement afficher la date reçue via le prop _value_.\r\n- [x ] I'm not an internal contributor\r\n<!-- If so, issues should be created within JIRA -->\r\n<!-- END_REQUIRED -->\r\n\r\n<!-- Thanks for contributing! -->\r\n"}}
{"actor":{"display_login":"Gehbrial"}}