{"action":"created","issue":{"url":"https://api.github.com/repos/nosir/cleave.js/issues/36","repository_url":"https://api.github.com/repos/nosir/cleave.js","labels_url":"https://api.github.com/repos/nosir/cleave.js/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/nosir/cleave.js/issues/36/comments","events_url":"https://api.github.com/repos/nosir/cleave.js/issues/36/events","html_url":"https://github.com/nosir/cleave.js/issues/36","id":165605301,"number":36,"title":"Date formatter behavior not very intuitive","user":{"login":"Skywalker13","id":397862,"avatar_url":"https://avatars.githubusercontent.com/u/397862?v=3","gravatar_id":"","url":"https://api.github.com/users/Skywalker13","html_url":"https://github.com/Skywalker13","followers_url":"https://api.github.com/users/Skywalker13/followers","following_url":"https://api.github.com/users/Skywalker13/following{/other_user}","gists_url":"https://api.github.com/users/Skywalker13/gists{/gist_id}","starred_url":"https://api.github.com/users/Skywalker13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skywalker13/subscriptions","organizations_url":"https://api.github.com/users/Skywalker13/orgs","repos_url":"https://api.github.com/users/Skywalker13/repos","events_url":"https://api.github.com/users/Skywalker13/events{/privacy}","received_events_url":"https://api.github.com/users/Skywalker13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-14T16:37:06Z","updated_at":"2016-07-15T04:20:33Z","closed_at":null,"body":"Hello,\r\n\r\nThanks for this lib but I'm a bit disappointed about the date formatter.\r\n\r\n\r\nFor example with: \r\n```js\r\nvar cleave = new Cleave('.input-element', {\r\n    date: true,\r\n    datePattern: ['m', 'y']\r\n});\r\n```\r\n\r\nIf I want `09/12`; I must type `0`, `9`, `1` and `2`\r\nBut if I type `9`, `/`, `1`, and `2`, the `/` is not handled. The `0` should be added automatically\r\n\r\nThis one is a real problem:\r\n```js\r\nvar cleave = new Cleave('.input-element', {\r\n    date: true,\r\n    datePattern: ['Y', 'm', 'd']\r\n});\r\n```\r\n\r\nIt's very difficult to use because most users want to type for example:\r\n`1`, `6`, `/`, `1`, `/`, `2` for `2016/01/02`\r\n\r\n> Note that it should be possible to use `.` instead of `/` for example. Maybe other separators too.\r\n\r\nRegards"},"comment":{"url":"https://api.github.com/repos/nosir/cleave.js/issues/comments/232856533","html_url":"https://github.com/nosir/cleave.js/issues/36#issuecomment-232856533","issue_url":"https://api.github.com/repos/nosir/cleave.js/issues/36","id":232856533,"user":{"login":"nosir","id":352617,"avatar_url":"https://avatars.githubusercontent.com/u/352617?v=3","gravatar_id":"","url":"https://api.github.com/users/nosir","html_url":"https://github.com/nosir","followers_url":"https://api.github.com/users/nosir/followers","following_url":"https://api.github.com/users/nosir/following{/other_user}","gists_url":"https://api.github.com/users/nosir/gists{/gist_id}","starred_url":"https://api.github.com/users/nosir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nosir/subscriptions","organizations_url":"https://api.github.com/users/nosir/orgs","repos_url":"https://api.github.com/users/nosir/repos","events_url":"https://api.github.com/users/nosir/events{/privacy}","received_events_url":"https://api.github.com/users/nosir/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T04:20:33Z","updated_at":"2016-07-15T04:20:33Z","body":"9 -> 09: will be fixed here https://github.com/nosir/cleave.js/issues/16\r\n16/1/2 -> 2016/01/02: I would suggest you use: datePattern: ['y', 'm', 'd'], so it can identify type sequence: `1` `6` `0` `1` `0` `2` the 0 here will be required.\r\n`/` -> 'other delimiter': you can just pass `delimiter` within option param: https://github.com/nosir/cleave.js/blob/master/doc/options.md#delimiter\r\n"}}
{"actor":{"display_login":"nosir"}}