{"action":"created","issue":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/599","labels_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/599/comments","events_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/599/events","html_url":"https://github.com/KleeGroup/focus-components/issues/599","id":112793184,"number":599,"title":"[Date - Enhancement] Allow a getValue() customisation from the domain.","user":{"login":"JabX","id":3266897,"avatar_url":"https://avatars.githubusercontent.com/u/3266897?v=3","gravatar_id":"","url":"https://api.github.com/users/JabX","html_url":"https://github.com/JabX","followers_url":"https://api.github.com/users/JabX/followers","following_url":"https://api.github.com/users/JabX/following{/other_user}","gists_url":"https://api.github.com/users/JabX/gists{/gist_id}","starred_url":"https://api.github.com/users/JabX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JabX/subscriptions","organizations_url":"https://api.github.com/users/JabX/orgs","repos_url":"https://api.github.com/users/JabX/repos","events_url":"https://api.github.com/users/JabX/events{/privacy}","received_events_url":"https://api.github.com/users/JabX/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KleeGroup/focus-components/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"Bernardstanislas","id":4435377,"avatar_url":"https://avatars.githubusercontent.com/u/4435377?v=3","gravatar_id":"","url":"https://api.github.com/users/Bernardstanislas","html_url":"https://github.com/Bernardstanislas","followers_url":"https://api.github.com/users/Bernardstanislas/followers","following_url":"https://api.github.com/users/Bernardstanislas/following{/other_user}","gists_url":"https://api.github.com/users/Bernardstanislas/gists{/gist_id}","starred_url":"https://api.github.com/users/Bernardstanislas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bernardstanislas/subscriptions","organizations_url":"https://api.github.com/users/Bernardstanislas/orgs","repos_url":"https://api.github.com/users/Bernardstanislas/repos","events_url":"https://api.github.com/users/Bernardstanislas/events{/privacy}","received_events_url":"https://api.github.com/users/Bernardstanislas/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/KleeGroup/focus-components/milestones/8","html_url":"https://github.com/KleeGroup/focus-components/milestones/Next%20release%20(Focus%20Components%20v0.7.3)","labels_url":"https://api.github.com/repos/KleeGroup/focus-components/milestones/8/labels","id":1355681,"number":8,"title":"Next release (Focus Components v0.7.3)","description":"","creator":{"login":"Tommass","id":5349745,"avatar_url":"https://avatars.githubusercontent.com/u/5349745?v=3","gravatar_id":"","url":"https://api.github.com/users/Tommass","html_url":"https://github.com/Tommass","followers_url":"https://api.github.com/users/Tommass/followers","following_url":"https://api.github.com/users/Tommass/following{/other_user}","gists_url":"https://api.github.com/users/Tommass/gists{/gist_id}","starred_url":"https://api.github.com/users/Tommass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tommass/subscriptions","organizations_url":"https://api.github.com/users/Tommass/orgs","repos_url":"https://api.github.com/users/Tommass/repos","events_url":"https://api.github.com/users/Tommass/events{/privacy}","received_events_url":"https://api.github.com/users/Tommass/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":26,"state":"open","created_at":"2015-10-14T16:05:44Z","updated_at":"2015-10-22T12:50:23Z","due_on":"2015-10-22T22:00:00Z","closed_at":null},"comments":2,"created_at":"2015-10-22T12:34:30Z","updated_at":"2015-10-22T13:07:31Z","closed_at":null,"body":"I'll be speaking here only about pure dates (with no time).\r\n\r\nCurrently, all date/time(s) are handled as ISO strings, converted in the user's locale.\r\nThat means that when a user selects a date in the date picker, it represents the chosen date at midnight in the user's locale. For instance, if I select 22/10/2015, it is represented as `22/10/2015 00:00:00 GMT+2`, and the ISO string (which will be send to the server) is then `21/10/2015 22:00:00`.\r\n\r\nI understand this is a perfectly normal behaviour and that it might be required for some projects, but in my case (and probably others') I'd like to ignore totally the time component and the user's locale and output a nice `22/10/2015 00:00:00` ISO string when I pick a date. That's way easier to reason with for us.\r\n\r\nIt's probably not Focus's place to handle this kind of behaviour, but it would be nice to have a hook somewhere to implement this ourselves. The right place for it would be in the date component's `getValue()` method, which is called to build the data that will be sent to the server. So if we had a little `formatValue` method in the domain that will apply a transformation to the result of `getValue()`, it would be perfect.\r\nI can see it being useful for other components and domains as well."},"comment":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/comments/150214363","html_url":"https://github.com/KleeGroup/focus-components/issues/599#issuecomment-150214363","issue_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/599","id":150214363,"user":{"login":"pierr","id":286966,"avatar_url":"https://avatars.githubusercontent.com/u/286966?v=3","gravatar_id":"","url":"https://api.github.com/users/pierr","html_url":"https://github.com/pierr","followers_url":"https://api.github.com/users/pierr/followers","following_url":"https://api.github.com/users/pierr/following{/other_user}","gists_url":"https://api.github.com/users/pierr/gists{/gist_id}","starred_url":"https://api.github.com/users/pierr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierr/subscriptions","organizations_url":"https://api.github.com/users/pierr/orgs","repos_url":"https://api.github.com/users/pierr/repos","events_url":"https://api.github.com/users/pierr/events{/privacy}","received_events_url":"https://api.github.com/users/pierr/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T13:07:31Z","updated_at":"2015-10-22T13:07:31Z","body":"As discussed together\r\n- in => ISOSTRING\r\n- out => ISOSTRING\r\n- a props such as transformValue in order to change (depending on the project) the way the date is get before it's sent to the server.\r\n- This will be called in the getValue function\r\n- Then you have to be coherent on the server side, the date won't be transform before it's provided to the component"}}