comparison 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
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 $(document).ready(function() {
2 $('#id_start_date').datepicker({constrainInput: true,
3 dateFormat: 'mm/dd/yy',
4 onClose: function () {
5 var end = $('#id_end_date');
6 if (this.value > end.val())
7 {
8 end.val(this.value);
9 }
10 }
11 });
12 $('#id_end_date').datepicker({constrainInput: true,
13 dateFormat: 'mm/dd/yy',
14 onClose: function () {
15 var start = $('#id_start_date');
16 if (this.value < start.val())
17 {
18 start.val(this.value);
19 }
20 }
21 });
22 if ($('#id_all_day:checked').length)
23 {
24 $('#id_start_time').hide();
25 $('#id_end_time').hide();
26 $('#id_tz_stuff').hide();
27 }
28 $('#id_all_day').click(function () {
29 $('#id_start_time').toggle();
30 $('#id_end_time').toggle();
31 $('#id_tz_stuff').toggle();
32 });
33 });