Added date picker to "date made" on "add sandwich" template.
[~kgodey/maayanwich.git] / templates / sandwich.html
index e2acdbc..1b2b2fc 100644 (file)
@@ -2,7 +2,11 @@
 {% block extrahead %}
 <script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery-1.4.2.min.js"></script>
 <script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery.tokeninput.js"></script>
+<script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/date.js"></script>
+<!--[if IE]><script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery.bgiframe.js"></script><![endif]-->
+<script type="text/javascript" src="http://127.0.0.1:8000/sandwiches/jquery.datePicker.js"></script>
 <link rel="stylesheet" href="http://127.0.0.1:8000/sandwiches/token-input.css" type="text/css" />
+<link rel="stylesheet" href="http://127.0.0.1:8000/sandwiches/datePicker.css" type="text/css" />
 <script type="text/javascript">
 $(document).ready(function () {
   $("#id_ing").tokenInput("/ajaxfun/", {
@@ -12,6 +16,14 @@ $(document).ready(function () {
 });
 });
 </script>
+<script type="text/javascript">
+Date.firstDayOfWeek = 0;
+Date.format = 'yyyy-mm-dd';
+$(function()
+{
+       $('#id_date_made').datePicker({startDate:'1996-01-01'}).val(new Date().asString()).trigger('change');
+});
+</script>
 {% endblock %}
 {% block title %}Add a sandwich{% endblock %}
 {% block content %}