{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primeng/issues/6081","repository_url":"https://api.github.com/repos/primefaces/primeng","labels_url":"https://api.github.com/repos/primefaces/primeng/issues/6081/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primeng/issues/6081/comments","events_url":"https://api.github.com/repos/primefaces/primeng/issues/6081/events","html_url":"https://github.com/primefaces/primeng/pull/6081","id":341577188,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNjgyMjkx","number":6081,"title":"New p-datepicker element","user":{"login":"Menecats","id":26714683,"node_id":"MDQ6VXNlcjI2NzE0Njgz","avatar_url":"https://avatars3.githubusercontent.com/u/26714683?v=4","gravatar_id":"","url":"https://api.github.com/users/Menecats","html_url":"https://github.com/Menecats","followers_url":"https://api.github.com/users/Menecats/followers","following_url":"https://api.github.com/users/Menecats/following{/other_user}","gists_url":"https://api.github.com/users/Menecats/gists{/gist_id}","starred_url":"https://api.github.com/users/Menecats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Menecats/subscriptions","organizations_url":"https://api.github.com/users/Menecats/orgs","repos_url":"https://api.github.com/users/Menecats/repos","events_url":"https://api.github.com/users/Menecats/events{/privacy}","received_events_url":"https://api.github.com/users/Menecats/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-16T15:54:12Z","updated_at":"2018-07-20T15:37:20Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/primefaces/primeng/pulls/6081","html_url":"https://github.com/primefaces/primeng/pull/6081","diff_url":"https://github.com/primefaces/primeng/pull/6081.diff","patch_url":"https://github.com/primefaces/primeng/pull/6081.patch"},"body":"Hi,\r\n\r\nI've just created this brand new component, mainly to fix the gap left when removing the 'utc' flag (#5853) but also to fix some issues in the time picker when minDate and maxDate are set.\r\n\r\nThis component use Luxon under the hood and allows to pick time in the specified timezone.\r\n\r\nIt also allows single, multi and ranges selections with years, months and days; for example the code below allows to pick different months.\r\n\r\n```HTML\r\n<p-datepicker [(ngModel)]=\"value\"\r\n              selectionMode=\"multiple\"\r\n              precision=\"month\"\r\n              dateFormat=\"MM/yyyy\">\r\n</p-datepicker>\r\n```\r\n\r\n**Note:** I've also added an EventEmitter to the p-inputmask element in order to obtain the click event from the datepicker element"},"comment":{"url":"https://api.github.com/repos/primefaces/primeng/issues/comments/406638385","html_url":"https://github.com/primefaces/primeng/pull/6081#issuecomment-406638385","issue_url":"https://api.github.com/repos/primefaces/primeng/issues/6081","id":406638385,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjYzODM4NQ==","user":{"login":"Menecats","id":26714683,"node_id":"MDQ6VXNlcjI2NzE0Njgz","avatar_url":"https://avatars3.githubusercontent.com/u/26714683?v=4","gravatar_id":"","url":"https://api.github.com/users/Menecats","html_url":"https://github.com/Menecats","followers_url":"https://api.github.com/users/Menecats/followers","following_url":"https://api.github.com/users/Menecats/following{/other_user}","gists_url":"https://api.github.com/users/Menecats/gists{/gist_id}","starred_url":"https://api.github.com/users/Menecats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Menecats/subscriptions","organizations_url":"https://api.github.com/users/Menecats/orgs","repos_url":"https://api.github.com/users/Menecats/repos","events_url":"https://api.github.com/users/Menecats/events{/privacy}","received_events_url":"https://api.github.com/users/Menecats/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T15:37:20Z","updated_at":"2018-07-20T15:37:20Z","author_association":"NONE","body":"With these new changes it's possible to specify some default configuration directly when the module is imported.\r\n\r\n### Module import w/ configuration\r\n\r\nModule:\r\n```typescript\r\n@NgModule({\r\n  imports: [\r\n    ...\r\n\r\n    DatePickerModule.configure({\r\n      zone: 'utc',\r\n      dateFormat: 'yyyy/MM/dd'\r\n    }),\r\n\r\n    ...\r\n  ],\r\n  ...\r\n})\r\nexport class MyAwesomeModule() {\r\n}\r\n```\r\n\r\nTemplate:\r\n```html\r\n<p-datepicker [(ngModel)]=\"myValue\"></p-datepicker> <!-- zone=utc, dateFormat=yyyy/MM/dd -->\r\n<p-datepicker [(ngModel)]=\"myValue\" zone=\"local\"></p-datepicker> <!-- zone=local, dateFormat=yyyy/MM/dd -->\r\n<p-datepicker [(ngModel)]=\"myValue\" dateFormat=\"dd/MM/yyyy\"></p-datepicker> <!-- zone=utc, dateFormat=dd/MM/yyyy -->\r\n```\r\n\r\n### Plain module import\r\n\r\nModule:\r\n```typescript\r\n@NgModule({\r\n  imports: [\r\n    ...\r\n\r\n    DatePickerModule,\r\n\r\n    ...\r\n  ],\r\n  ...\r\n})\r\nexport class MyAwesomeModule() {\r\n}\r\n```\r\n\r\nTemplate:\r\n```html\r\n<p-datepicker [(ngModel)]=\"myValue\" zone=\"utc\" dateFormat=\"yyyy/MM/dd\"></p-datepicker> <!-- zone=utc, dateFormat=yyyy/MM/dd -->\r\n<p-datepicker [(ngModel)]=\"myValue\" dateFormat=\"yyyy/MM/dd\"></p-datepicker> <!-- zone=local, dateFormat=yyyy/MM/dd -->\r\n<p-datepicker [(ngModel)]=\"myValue\" zone=\"utc\"></p-datepicker> <!-- zone=utc, dateFormat=dd/MM/yyyy -->\r\n```"}}
{"actor":{"display_login":"Menecats"}}