prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Pages availability is confusing and missing date pickers
  I created a page and set it `Visible in menu`. The "from" and "to" fields don't have date pickers and I thought they would be optional anyway, seems logical to me as saving works without filling them.
  
  My page didn't appear in shop side. I then went back and manually typed a date "2014-01-01", saved, and pages menu appeared.
  
  So, imho `from` and `to` should be optional constraints and they should definitely have date pickers.
  
  ![selection_085](https://cloud.githubusercontent.com/assets/1174866/8476154/269eb5c0-20c7-11e5-87ed-c564c8cd0194.png)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `shoop/admin/templatetags/shoop_admin.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 # This file is part of Shoop.
  3 #
  4 # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
  5 #
  6 # This source code is licensed under the AGPLv3 license found in the
  7 # LICENSE file in the root directory of this source tree.
  8 
  9 from bootstrap3.renderers import FormRenderer
  10 from django.utils.safestring import mark_safe
  11 from django_jinja import library
  12 
  13 from shoop.admin.template_helpers import shoop_admin as shoop_admin_template_helpers
  14 from shoop.admin.utils.bs3_renderers import AdminFieldRenderer
  15 
  16 
  17 class Bootstrap3Namespace(object):
  18     def field(self, field, **kwargs):
  19         if not field:
  20             return ""
  21         return mark_safe(AdminFieldRenderer(field, **kwargs).render())
  22 
  23     def form(self, form, **kwargs):
  24         return mark_safe(FormRenderer(form, **kwargs).render())
  25 
  26 
  27 library.global_function(name="shoop_admin", fn=shoop_admin_template_helpers)
  28 library.global_function(name="bs3", fn=Bootstrap3Namespace())
  29
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/shoop/admin/templatetags/shoop_admin.py b/shoop/admin/templatetags/shoop_admin.py
  --- a/shoop/admin/templatetags/shoop_admin.py
  +++ b/shoop/admin/templatetags/shoop_admin.py
  @@ -23,6 +23,11 @@
       def form(self, form, **kwargs):
           return mark_safe(FormRenderer(form, **kwargs).render())
   
  +    def datetime_field(self, field, **kwargs):
  +        kwargs.setdefault("widget_class", "datetime")
  +        kwargs.setdefault("addon_after", "<span class='fa fa-calendar'></span>")
  +        return self.field(field, **kwargs)
  +
   
   library.global_function(name="shoop_admin", fn=shoop_admin_template_helpers)
   library.global_function(name="bs3", fn=Bootstrap3Namespace())
  
verification_info: {"golden_diff": "diff --git a/shoop/admin/templatetags/shoop_admin.py b/shoop/admin/templatetags/shoop_admin.py\n--- a/shoop/admin/templatetags/shoop_admin.py\n+++ b/shoop/admin/templatetags/shoop_admin.py\n@@ -23,6 +23,11 @@\n     def form(self, form, **kwargs):\n         return mark_safe(FormRenderer(form, **kwargs).render())\n \n+    def datetime_field(self, field, **kwargs):\n+        kwargs.setdefault(\"widget_class\", \"datetime\")\n+        kwargs.setdefault(\"addon_after\", \"<span class='fa fa-calendar'></span>\")\n+        return self.field(field, **kwargs)\n+\n \n library.global_function(name=\"shoop_admin\", fn=shoop_admin_template_helpers)\n library.global_function(name=\"bs3\", fn=Bootstrap3Namespace())\n", "issue": "Pages availability is confusing and missing date pickers\nI created a page and set it `Visible in menu`. The \"from\" and \"to\" fields don't have date pickers and I thought they would be optional anyway, seems logical to me as saving works without filling them.\n\nMy page didn't appear in shop side. I then went back and manually typed a date \"2014-01-01\", saved, and pages menu appeared.\n\nSo, imho `from` and `to` should be optional constraints and they should definitely have date pickers.\n\n![selection_085](https://cloud.githubusercontent.com/assets/1174866/8476154/269eb5c0-20c7-11e5-87ed-c564c8cd0194.png)\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# This file is part of Shoop.\n#\n# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.\n#\n# This source code is licensed under the AGPLv3 license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom bootstrap3.renderers import FormRenderer\nfrom django.utils.safestring import mark_safe\nfrom django_jinja import library\n\nfrom shoop.admin.template_helpers import shoop_admin as shoop_admin_template_helpers\nfrom shoop.admin.utils.bs3_renderers import AdminFieldRenderer\n\n\nclass Bootstrap3Namespace(object):\n    def field(self, field, **kwargs):\n        if not field:\n            return \"\"\n        return mark_safe(AdminFieldRenderer(field, **kwargs).render())\n\n    def form(self, form, **kwargs):\n        return mark_safe(FormRenderer(form, **kwargs).render())\n\n\nlibrary.global_function(name=\"shoop_admin\", fn=shoop_admin_template_helpers)\nlibrary.global_function(name=\"bs3\", fn=Bootstrap3Namespace())\n", "path": "shoop/admin/templatetags/shoop_admin.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# This file is part of Shoop.\n#\n# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.\n#\n# This source code is licensed under the AGPLv3 license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom bootstrap3.renderers import FormRenderer\nfrom django.utils.safestring import mark_safe\nfrom django_jinja import library\n\nfrom shoop.admin.template_helpers import shoop_admin as shoop_admin_template_helpers\nfrom shoop.admin.utils.bs3_renderers import AdminFieldRenderer\n\n\nclass Bootstrap3Namespace(object):\n    def field(self, field, **kwargs):\n        if not field:\n            return \"\"\n        return mark_safe(AdminFieldRenderer(field, **kwargs).render())\n\n    def form(self, form, **kwargs):\n        return mark_safe(FormRenderer(form, **kwargs).render())\n\n    def datetime_field(self, field, **kwargs):\n        kwargs.setdefault(\"widget_class\", \"datetime\")\n        kwargs.setdefault(\"addon_after\", \"<span class='fa fa-calendar'></span>\")\n        return self.field(field, **kwargs)\n\n\nlibrary.global_function(name=\"shoop_admin\", fn=shoop_admin_template_helpers)\nlibrary.global_function(name=\"bs3\", fn=Bootstrap3Namespace())\n", "path": "shoop/admin/templatetags/shoop_admin.py"}]}