{"action":"created","issue":{"url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/2295","labels_url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/2295/labels{/name}","comments_url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/2295/comments","events_url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/2295/events","html_url":"https://github.com/orbeon/orbeon-forms/issues/2295","id":94102207,"number":2295,"title":"Consider writing date, time and dateTime controls in XBL","user":{"login":"ebruchez","id":105769,"avatar_url":"https://avatars.githubusercontent.com/u/105769?v=3","gravatar_id":"","url":"https://api.github.com/users/ebruchez","html_url":"https://github.com/ebruchez","followers_url":"https://api.github.com/users/ebruchez/followers","following_url":"https://api.github.com/users/ebruchez/following{/other_user}","gists_url":"https://api.github.com/users/ebruchez/gists{/gist_id}","starred_url":"https://api.github.com/users/ebruchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebruchez/subscriptions","organizations_url":"https://api.github.com/users/ebruchez/orgs","repos_url":"https://api.github.com/users/ebruchez/repos","events_url":"https://api.github.com/users/ebruchez/events{/privacy}","received_events_url":"https://api.github.com/users/ebruchez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orbeon/orbeon-forms/labels/Form%20Builder","name":"Form Builder","color":"fad8c7"},{"url":"https://api.github.com/repos/orbeon/orbeon-forms/labels/RFE","name":"RFE","color":"444444"},{"url":"https://api.github.com/repos/orbeon/orbeon-forms/labels/XBL%20Components","name":"XBL Components","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T17:03:28Z","updated_at":"2015-09-05T00:44:21Z","closed_at":null,"body":"Currently these controls are implemented natively in the XForms engine, and is spread around:\r\n\r\n- `XFormsInputControl.scala`\r\n- `XFormsInputHandler.scala`\r\n- `xforms.js`\r\n- `calendar.coffee`\r\n\r\nThe logic associated with these controls can be complex, and making changes can be difficult. In addition, some of the code is pretty old, including using YUI code on the JS side. I would be more flexible to write these controls with XBL.\r\n\r\nOne showstopper for doing this completely generically is that the XForms engine doesn't support dynamically switching components (#1248). But this is not an issue for Form Builder (#1264). So in the context of Form Builder, we could have these controls bound to, e.g.:\r\n\r\n```css\r\n`xf|input:xxf-type('xs:date')\r\n```\r\n\r\nNext steps:\r\n\r\n- [ ] explore writing a custom `xf|input:xxf-type('xs:date')`\r\n  - should rely on nested `xf:input`? if so, ability to force plain input (instead of XForms engine imposing its own built-in control)\r\n- [ ] switch to non-YUI date picker (see also #1599)\r\n\r\nSee related [community thread](http://discuss.orbeon.com/Format-input-date-type-td4660150.html)."},"comment":{"url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/comments/137888001","html_url":"https://github.com/orbeon/orbeon-forms/issues/2295#issuecomment-137888001","issue_url":"https://api.github.com/repos/orbeon/orbeon-forms/issues/2295","id":137888001,"user":{"login":"ebruchez","id":105769,"avatar_url":"https://avatars.githubusercontent.com/u/105769?v=3","gravatar_id":"","url":"https://api.github.com/users/ebruchez","html_url":"https://github.com/ebruchez","followers_url":"https://api.github.com/users/ebruchez/followers","following_url":"https://api.github.com/users/ebruchez/following{/other_user}","gists_url":"https://api.github.com/users/ebruchez/gists{/gist_id}","starred_url":"https://api.github.com/users/ebruchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebruchez/subscriptions","organizations_url":"https://api.github.com/users/ebruchez/orgs","repos_url":"https://api.github.com/users/ebruchez/repos","events_url":"https://api.github.com/users/ebruchez/events{/privacy}","received_events_url":"https://api.github.com/users/ebruchez/received_events","type":"User","site_admin":false},"created_at":"2015-09-05T00:44:21Z","updated_at":"2015-09-05T00:44:21Z","body":"Noticing #481, an older issue about doing this in XForms. So let this current issue be about doing it without dynamic bindings, and so for Form Builder/Form Runner only, while #481 would be for the lower-level XForms version (if we care about that)."}}