thekingsimo / jquery-week-calendar

Automatically exported from code.google.com/p/jquery-week-calendar
0 stars 0 forks source link

Self adjustement of the end date in Event edition - bug IE6 Only #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
in the event edition dialog, I can select a start date greater than the
event end date. At this time, the end date is automatically adjusted, 2
time slots away from the start date.

for example:
event : start:9h, end 10h
I move the start to 12h, then then end should be automatically set to 13h

This does not work with IE6: in such a case it raises an error on the line 213
  $endTimeField.find("option:eq(1)").attr("selected", "selected");

I found a possible workaround...There may be a clever one :)
-----------------------------------------------------------

demo.js, round line 211
        if(!endTimeSelected) {
           //automatically select an end date 2 slots away. 
           $endTimeField.find("option:eq(1)").attr("selected", "selected");
        }
replaced by

        if(!endTimeSelected) {
           //automatically select an end date 2 slots away. 
           if(typeof($endTimeField.find("option")[1])=='undefined'){
              // case of start=(last -1 )time slot in the day...
              $endTimeField.find("option")[0].selected=true;
           } else {
              $endTimeField.find("option")[1].selected=true;
           }
        }

Original issue reported on code.google.com by nicolas....@gmail.com on 28 Sep 2009 at 10:17

GoogleCodeExporter commented 8 years ago
I haven't done any testing in IE6 and didn't really plan to support it. If this 
is
the only issue in IE6 i'd be extremely surprised but I may look into this to 
see if
it's as simple as fixing one or two things to make it work.  No promises at this
stage though i'm sorry.  

Original comment by robmo...@gmail.com on 30 Oct 2009 at 5:59