{"action":"created","issue":{"url":"https://api.github.com/repos/vazco/uniforms/issues/480","repository_url":"https://api.github.com/repos/vazco/uniforms","labels_url":"https://api.github.com/repos/vazco/uniforms/issues/480/labels{/name}","comments_url":"https://api.github.com/repos/vazco/uniforms/issues/480/comments","events_url":"https://api.github.com/repos/vazco/uniforms/issues/480/events","html_url":"https://github.com/vazco/uniforms/pull/480","id":375964891,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3Mjg3NTc4","number":480,"title":"Support date and datetime-local inputs","user":{"login":"Floriferous","id":10428082,"node_id":"MDQ6VXNlcjEwNDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/10428082?v=4","gravatar_id":"","url":"https://api.github.com/users/Floriferous","html_url":"https://github.com/Floriferous","followers_url":"https://api.github.com/users/Floriferous/followers","following_url":"https://api.github.com/users/Floriferous/following{/other_user}","gists_url":"https://api.github.com/users/Floriferous/gists{/gist_id}","starred_url":"https://api.github.com/users/Floriferous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Floriferous/subscriptions","organizations_url":"https://api.github.com/users/Floriferous/orgs","repos_url":"https://api.github.com/users/Floriferous/repos","events_url":"https://api.github.com/users/Floriferous/events{/privacy}","received_events_url":"https://api.github.com/users/Floriferous/received_events","type":"User","site_admin":false},"labels":[{"id":373826914,"node_id":"MDU6TGFiZWwzNzM4MjY5MTQ=","url":"https://api.github.com/repos/vazco/uniforms/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"radekmie","id":1379064,"node_id":"MDQ6VXNlcjEzNzkwNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1379064?v=4","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false},"assignees":[{"login":"radekmie","id":1379064,"node_id":"MDQ6VXNlcjEzNzkwNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1379064?v=4","gravatar_id":"","url":"https://api.github.com/users/radekmie","html_url":"https://github.com/radekmie","followers_url":"https://api.github.com/users/radekmie/followers","following_url":"https://api.github.com/users/radekmie/following{/other_user}","gists_url":"https://api.github.com/users/radekmie/gists{/gist_id}","starred_url":"https://api.github.com/users/radekmie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radekmie/subscriptions","organizations_url":"https://api.github.com/users/radekmie/orgs","repos_url":"https://api.github.com/users/radekmie/repos","events_url":"https://api.github.com/users/radekmie/events{/privacy}","received_events_url":"https://api.github.com/users/radekmie/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-10-31T13:34:45Z","updated_at":"2018-11-13T16:52:41Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/vazco/uniforms/pulls/480","html_url":"https://github.com/vazco/uniforms/pull/480","diff_url":"https://github.com/vazco/uniforms/pull/480.diff","patch_url":"https://github.com/vazco/uniforms/pull/480.patch"},"body":"It'd be helpful for DateField to also support `type: 'date'` inputs, instead of only `datefield-local`. Currently, you can change the type, but the data does not appear, as it has to be formatted properly: `YYYY-MM-DD`.\r\n \r\nI propose a working, though not very elegant solution, that checks for `inputProps` being passed to the material-ui `Input` component. [(source)](https://stackoverflow.com/questions/14647290/html-5-date-field-shows-as-mm-dd-yyyy-in-chrome-even-when-valid-date-is-set)\r\n\r\nSo to use this you have to do (with simple schema):\r\n\r\n```js\r\nnew SimpleSchema({\r\n  dateField: { type: Date, uniforms: { inputProps: { type: 'date' } } },\r\n  dateTimeField: { type: Date },\r\n})\r\n```\r\n\r\nIt works in chrome, haven't tested it in other browsers yet."},"comment":{"url":"https://api.github.com/repos/vazco/uniforms/issues/comments/438346354","html_url":"https://github.com/vazco/uniforms/pull/480#issuecomment-438346354","issue_url":"https://api.github.com/repos/vazco/uniforms/issues/480","id":438346354,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODM0NjM1NA==","user":{"login":"Floriferous","id":10428082,"node_id":"MDQ6VXNlcjEwNDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/10428082?v=4","gravatar_id":"","url":"https://api.github.com/users/Floriferous","html_url":"https://github.com/Floriferous","followers_url":"https://api.github.com/users/Floriferous/followers","following_url":"https://api.github.com/users/Floriferous/following{/other_user}","gists_url":"https://api.github.com/users/Floriferous/gists{/gist_id}","starred_url":"https://api.github.com/users/Floriferous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Floriferous/subscriptions","organizations_url":"https://api.github.com/users/Floriferous/orgs","repos_url":"https://api.github.com/users/Floriferous/repos","events_url":"https://api.github.com/users/Floriferous/events{/privacy}","received_events_url":"https://api.github.com/users/Floriferous/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T16:52:41Z","updated_at":"2018-11-13T16:52:41Z","author_association":"NONE","body":"How do you suggest we do this:\r\n\r\n* Add support for native `type='date'`, `type='datetime-local'`, and `type='time'`, even though we're manipulating the value with custom functions\r\n* Custom type: `time, date, date-time`\r\n* Other idea?\r\n\r\nThe schemas will probably have to be defined as follows:\r\n\r\n```js\r\nnew SimpleSchema({\r\n  dateField: { type: String, uniforms: { type: 'date' } },\r\n  dateTimeField: { type: String, uniforms: { type: 'time' } },\r\n});\r\n```\r\n\r\nOr should we store them as `Date` types, without date (`hh:mm`)/without time respectively (`dd-mm-yyyy`)?"}}
{"actor":{"display_login":"Floriferous"}}