Mercurial > public > sg101
diff gcalendar/static/js/gcalendar.js @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/gcalendar/static/js/gcalendar.js@88b2b9cb8c1f |
children | 110bbc78a482 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcalendar/static/js/gcalendar.js Sat May 05 17:10:48 2012 -0500 @@ -0,0 +1,33 @@ +$(document).ready(function() { + $('#id_start_date').datepicker({constrainInput: true, + dateFormat: 'mm/dd/yy', + onClose: function () { + var end = $('#id_end_date'); + if (this.value > end.val()) + { + end.val(this.value); + } + } + }); + $('#id_end_date').datepicker({constrainInput: true, + dateFormat: 'mm/dd/yy', + onClose: function () { + var start = $('#id_start_date'); + if (this.value < start.val()) + { + start.val(this.value); + } + } + }); + if ($('#id_all_day:checked').length) + { + $('#id_start_time').hide(); + $('#id_end_time').hide(); + $('#id_tz_stuff').hide(); + } + $('#id_all_day').click(function () { + $('#id_start_time').toggle(); + $('#id_end_time').toggle(); + $('#id_tz_stuff').toggle(); + }); +});