{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/4204","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/4204/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/4204/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/4204/events","html_url":"https://github.com/bokeh/bokeh/issues/4204","id":149924209,"number":4204,"title":"Bug Report? DatePicker widget errors on changing dates","user":{"login":"jbrambleDC","id":6984748,"avatar_url":"https://avatars.githubusercontent.com/u/6984748?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrambleDC","html_url":"https://github.com/jbrambleDC","followers_url":"https://api.github.com/users/jbrambleDC/followers","following_url":"https://api.github.com/users/jbrambleDC/following{/other_user}","gists_url":"https://api.github.com/users/jbrambleDC/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrambleDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrambleDC/subscriptions","organizations_url":"https://api.github.com/users/jbrambleDC/orgs","repos_url":"https://api.github.com/users/jbrambleDC/repos","events_url":"https://api.github.com/users/jbrambleDC/events{/privacy}","received_events_url":"https://api.github.com/users/jbrambleDC/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20bug","name":"type: bug","color":"C02942"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bokeh/bokeh/milestones/23","html_url":"https://github.com/bokeh/bokeh/milestones/0.12","labels_url":"https://api.github.com/repos/bokeh/bokeh/milestones/23/labels","id":1477666,"number":23,"title":"0.12","description":"","creator":{"login":"mattpap","id":27475,"avatar_url":"https://avatars.githubusercontent.com/u/27475?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpap","html_url":"https://github.com/mattpap","followers_url":"https://api.github.com/users/mattpap/followers","following_url":"https://api.github.com/users/mattpap/following{/other_user}","gists_url":"https://api.github.com/users/mattpap/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpap/subscriptions","organizations_url":"https://api.github.com/users/mattpap/orgs","repos_url":"https://api.github.com/users/mattpap/repos","events_url":"https://api.github.com/users/mattpap/events{/privacy}","received_events_url":"https://api.github.com/users/mattpap/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":438,"state":"open","created_at":"2015-12-29T23:54:47Z","updated_at":"2016-05-30T19:52:49Z","due_on":"2016-05-16T05:00:00Z","closed_at":null},"comments":13,"created_at":"2016-04-21T00:36:48Z","updated_at":"2016-05-31T03:04:24Z","closed_at":null,"body":"I am running a bokeh server app on 0.11.1. I am creating a DatePicker widget as follows:\r\n```python\r\nbeginning = DatePicker(title=\"Begin Date\", min_date=datetime(2014,11,1),\r\n                       max_date=datetime.now(),\r\n                       value=datetime(datetime.now().year,1,1)\r\n                       )\r\n```\r\n\r\nI am running the app as follows:\r\n`bokeh serve --show usage_app.py`\r\n\r\nThe DatePicker loads properly and displays as expected in the app. I have tested the default value, and it properly sets a default value of 2016-01-01, I have tried it using strings and datetime objects, both of which work. The issue is on changing dates. When I select a new date or try to change the month on the calendar display it immediately errors out and changes to a different, more primitive display.\r\n\r\n<img width=\"321\" alt=\"screen shot 2016-04-20 at 8 33 46 pm\" src=\"https://cloud.githubusercontent.com/assets/6984748/14694543/4efce17a-0737-11e6-9275-1661b1c88b15.png\">\r\n\r\nIn order to be exhaustive, I have tried declaring the object with and without mind and max dates. and I still reproduce the same error.\r\n\r\nHere is the stack trace:\r\n\r\n```\r\nERROR:bokeh.server.protocol.server_handler:error handling message Message 'PATCH-DOC' (revision 1): ValueError('expected a date, string or timestamp, got {}',)\r\nDEBUG:bokeh.server.protocol.server_handler:  message header {u'msgid': u'6FA6441007BD454A9A19EB7098C41857', u'msgtype': u'PATCH-DOC'} content {u'references': [], u'events': [{u'new': {}, u'kind': u'ModelChanged', u'model': {u'type': u'DatePicker', u'id': u'538ca18f-efd5-4907-b770-c891f375f13a'}, u'attr': u'value'}]}\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/server/protocol/server_handler.py\", line 38, in handle\r\n    work = yield handler(message, connection)\r\n  File \"/Library/Python/2.7/site-packages/tornado/gen.py\", line 1008, in run\r\n    value = future.result()\r\n  File \"/Library/Python/2.7/site-packages/tornado/concurrent.py\", line 232, in result\r\n    raise_exc_info(self._exc_info)\r\n  File \"/Library/Python/2.7/site-packages/tornado/gen.py\", line 1017, in run\r\n    yielded = self.gen.send(value)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/server/session.py\", line 42, in _needs_document_lock_wrapper\r\n    result = yield yield_for_all_futures(func(self, *args, **kwargs))\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/server/session.py\", line 212, in _handle_patch\r\n    message.apply_to_document(self.document)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/server/protocol/messages/patch_doc.py\", line 85, in apply_to_document\r\n    doc.apply_json_patch(self.content)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/document.py\", line 862, in apply_json_patch\r\n    patched_obj.set_from_json(attr, value, models=references)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/core/properties.py\", line 733, in set_from_json\r\n    prop.set_from_json(self, json, models)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/core/properties.py\", line 371, in set_from_json\r\n    models)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/core/properties.py\", line 323, in set_from_json\r\n    return self.__set__(obj, json)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/core/properties.py\", line 453, in __set__\r\n    value = self.descriptor.prepare_value(obj.__class__, self.name, value)\r\n  File \"/usr/local/lib/python2.7/site-packages/bokeh/core/properties.py\", line 272, in prepare_value\r\n    raise e\r\nValueError: expected a date, string or timestamp, got {}\r\n```\r\n\r\nMy apologies if I am missing something with how to use this object. I was following the 0.11 reference on widgets."},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/222582684","html_url":"https://github.com/bokeh/bokeh/issues/4204#issuecomment-222582684","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/4204","id":222582684,"user":{"login":"savadhani","id":5961728,"avatar_url":"https://avatars.githubusercontent.com/u/5961728?v=3","gravatar_id":"","url":"https://api.github.com/users/savadhani","html_url":"https://github.com/savadhani","followers_url":"https://api.github.com/users/savadhani/followers","following_url":"https://api.github.com/users/savadhani/following{/other_user}","gists_url":"https://api.github.com/users/savadhani/gists{/gist_id}","starred_url":"https://api.github.com/users/savadhani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/savadhani/subscriptions","organizations_url":"https://api.github.com/users/savadhani/orgs","repos_url":"https://api.github.com/users/savadhani/repos","events_url":"https://api.github.com/users/savadhani/events{/privacy}","received_events_url":"https://api.github.com/users/savadhani/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T03:04:24Z","updated_at":"2016-05-31T03:04:24Z","body":"Oh alright!  Thanks a lot @bryevdv.  May I know when Bokeh update is going to be released?  "}}
{"actor":{"display_login":"savadhani"}}