{"action":"created","issue":{"url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1053","repository_url":"https://api.github.com/repos/flatpickr/flatpickr","labels_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1053/labels{/name}","comments_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1053/comments","events_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1053/events","html_url":"https://github.com/flatpickr/flatpickr/issues/1053","id":263871486,"node_id":"MDU6SXNzdWUyNjM4NzE0ODY=","number":1053,"title":"3.1.3 Problem with locale","user":{"login":"Alex-Sokolov","id":4497128,"node_id":"MDQ6VXNlcjQ0OTcxMjg=","avatar_url":"https://avatars3.githubusercontent.com/u/4497128?v=4","gravatar_id":"","url":"https://api.github.com/users/Alex-Sokolov","html_url":"https://github.com/Alex-Sokolov","followers_url":"https://api.github.com/users/Alex-Sokolov/followers","following_url":"https://api.github.com/users/Alex-Sokolov/following{/other_user}","gists_url":"https://api.github.com/users/Alex-Sokolov/gists{/gist_id}","starred_url":"https://api.github.com/users/Alex-Sokolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alex-Sokolov/subscriptions","organizations_url":"https://api.github.com/users/Alex-Sokolov/orgs","repos_url":"https://api.github.com/users/Alex-Sokolov/repos","events_url":"https://api.github.com/users/Alex-Sokolov/events{/privacy}","received_events_url":"https://api.github.com/users/Alex-Sokolov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-09T12:05:22Z","updated_at":"2018-12-17T05:13:55Z","closed_at":"2017-10-10T13:21:45Z","author_association":"CONTRIBUTOR","body":"Works in 3.0.7. After update to 3.1.3 there is error in console and selected english locale\r\n```\r\nflatpickr.js:1520 flatpickr: invalid locale undefined\r\nsetupLocale @ flatpickr.js:1520\r\n```\r\n\r\nInit code:\r\n```js\r\nvar flatpickr = require('flatpickr');\r\nvar ru = require('flatpickr/dist/l10n/ru.js').ru;\r\nflatpickr('.datepicker', {\r\n  locale: ru,\r\n});\r\n```\r\n\r\n## Your Environment\r\n* flatpickr version used: 3.1.3\r\n* Browser name and version: Chrome 62\r\n* OS and version: Win 8.1\r\n"},"comment":{"url":"https://api.github.com/repos/flatpickr/flatpickr/issues/comments/447724964","html_url":"https://github.com/flatpickr/flatpickr/issues/1053#issuecomment-447724964","issue_url":"https://api.github.com/repos/flatpickr/flatpickr/issues/1053","id":447724964,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzcyNDk2NA==","user":{"login":"feihongly","id":2830653,"node_id":"MDQ6VXNlcjI4MzA2NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/2830653?v=4","gravatar_id":"","url":"https://api.github.com/users/feihongly","html_url":"https://github.com/feihongly","followers_url":"https://api.github.com/users/feihongly/followers","following_url":"https://api.github.com/users/feihongly/following{/other_user}","gists_url":"https://api.github.com/users/feihongly/gists{/gist_id}","starred_url":"https://api.github.com/users/feihongly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feihongly/subscriptions","organizations_url":"https://api.github.com/users/feihongly/orgs","repos_url":"https://api.github.com/users/feihongly/repos","events_url":"https://api.github.com/users/feihongly/events{/privacy}","received_events_url":"https://api.github.com/users/feihongly/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T05:13:55Z","updated_at":"2018-12-17T05:13:55Z","author_association":"NONE","body":"It seems changed in 4.5.2\r\n\r\nUse like this:\r\n```\r\nimport language from 'flatpickr/dist/l10n/zh'\r\n\r\nflatpickr('.flatpickr', {\r\n        locale: language.zh\r\n})\r\n```\r\n\r\nThe <language> is an Object:\r\n```\r\n{\r\n    default: {...}, \r\n    en: {...}, \r\n    zh: {...}\r\n}\r\n```\r\n\r\nthat worked in my project\r\nguide needs updating"}}
{"actor":{"display_login":"feihongly"}}