view media/js/gcalendar.js @ 131:5b69d6e01fd4

Creating a common way to display the smiley and markdown help dialogs for a markItUp textarea input form. Converted gcalendar over to it as a trial.
author Brian Neal <bgneal@gmail.com>
date Thu, 26 Nov 2009 22:47:17 +0000
parents c0d3b09c9b95
children 4e1abeb593c2
line wrap: on
line source
$(document).ready(function() {
    $('#id_start_date').datepicker({constrainInput: true, 
       onClose: function () {
         var end = $('#id_end_date');
         if (this.value > end.val())
         {
            end.val(this.value);
         }
       }
       });
    $('#id_end_date').datepicker({constrainInput: true,
       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();
       });
});