view gcalendar/static/js/gcalendar.js @ 1099:3f0a7e918c05

Prepare to detach V3 post box from GCalendar.
author Brian Neal <bgneal@gmail.com>
date Mon, 27 Jun 2016 20:11:17 -0500
parents d9cd3180c12c
children
line wrap: on
line source
$(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) {
       $('.all-day-hide').hide();
    }
    $('#id_all_day').click(function () {
       $('.all-day-hide').toggle();
    });
});