Loading ...
Sorry, an error occurred while loading the content.

RE: [ydn-javascript] Re: Calendar.select("10/1/2006 - 10/31/2006") fails to highlight oct 31st.

Expand Messages
  • Steven Peterson
    I tried changing my timezone to GMT-0300, and I still am unable to reproduce this issue. The private _parseRange function actually works using Integer arrays,
    Message 1 of 4 , May 30, 2006
    View Source
    • 0 Attachment

      I tried changing my timezone to GMT-0300, and I still am unable to reproduce this issue. The private _parseRange function actually works using Integer arrays, rather than Date objects, and converts them to Date objects using the month, day, and year fields. When I execute the same loop, it doesn’t break – the function returns all 4 days in the range, and they are rendered properly. Can you provide more detail on your setup so that I can try to track down what’s happening?

       

      Thanks!

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of dkottowk
      Sent: Monday, May 29, 2006 7:54 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Calendar.select("10/1/2006 - 10/31/2006") fails to highlight oct 31st.

       

      found out the cause of the problem myself.
      interestingly enough, it is due to the switch from winter time to
      summer time.

      digged into the source code and found the offending code in
      Calendar_Core.prototype._parseRange()

      there is a loop which in my case (being currently located in GMT-0300)
      would iterate over the following values for October 2006 given the
      range "10/12/2006 - 10/15/2006":

      12.10  0:00 GMT-4
      13.10  0:00 GMT-4
      13.10 23:00 GMT-4
      14.10 23:00 GMT-3
      15:10 23:00 GMT-3

      and the loop condition breaks. so the last date parsed is 14.10.

      a workaround that seems to work for me is:
      change the hours field on the end date to 23 before entering the while
      loop.

      dEnd.setHours(23);

      i believe this should work in general, but i have not given it a more
      serious thought...




      --- In ydn-javascript@yahoogroups.com, "dkottowk" <dkottowk@...> wrote:

      >
      > hi,
      > i discovered this odd behaviour while selecting date ranges:
      > when selecting dates in october the cell rendering sometimes wont
      > highlight the 31st although it is included in the range argument to
      > Calendar.select()
      >
      > e.g.
      >
      > myCalendar.select("10/10/2006 - 10/31/2006")
      > myCalendar.render()
      >
      > fails. but
      >
      > myCalendar.select("10/15/2006 - 10/31/2006")
      > myCalendar.render()
      >
      > does hightlight the 31st.
      >
      > this does not seem happen on any other month.
      > tested under firefox 1.5 & ie6
      > any clues for this ?
      > greetings daniel
      >





      SPONSORED LINKS

      C programming language

      Computer programming languages

      Java programming language

      The c programming language

      C programming language

      Concept of programming language

       


      YAHOO! GROUPS LINKS

       

       


    Your message has been successfully submitted and would be delivered to recipients shortly.