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

Re: [ydn-javascript] Date Output

Expand Messages
  • dav.glass@yahoo.com
    Steve -- That may actually be a coding issue 8-) The calendar returns an array of Javascript Date objects, what you are seeing is that JS will let you see it
    Message 1 of 3 , Aug 31, 2006
    View Source
    • 0 Attachment
      Steve --

      That may actually be a coding issue 8-)

      The calendar returns an array of Javascript Date objects, what you are seeing is that JS will let you see it as a string, sortof..

      So if you grab the return from getSelectedDates and do something like:
      var calDate = cal1.getSelectedDates()[0];
      calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/' + calDate.getFullYear();
      You will get a value in calData like : 8/31/2006

      See an example here:
      http://blog.davglass.com/files/yui/cal2/
       


      Dav Glass
      dav.glass@...
      davglass.com
      618.694.3476

      + Windows: n. - The most successful computer virus, ever. +
      + A computer without a Microsoft operating system is like a dog
      without bricks tied to its head +
      + A Microsoft Certified Systems Engineer is to computing what a
      McDonalds Certified Food Specialist is to fine cuisine +


      ----- Original Message ----
      From: Steve <steve22_77@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Thursday, August 31, 2006 8:55:21 PM
      Subject: [ydn-javascript] Date Output

      Hi all,

      We are using the Yahoo calendar on our intranet (with much success -
      thanks to everyone involved in the project), however we have come
      across a small anomoly... When a user using IE selects a date the
      date displays
      Tue, Sep 12 00:00:00 UTC+1000 2006

      In firefox it is displayed
      Tue, Sep 12 2006 00:00:00 UTC+1000

      We have found a work around - tell everyone to use IE

      however it would be nice if we could force it to return a set date
      format regardless of browser such as yyyy-mm-dd.

      Thanks

      Steve


    • Steve
      Gotcha.... I think.... leave it with me for the weekend... being friday afternoon my minds as tarp as a shack so to speak. Thanks again ... are seeing is that
      Message 2 of 3 , Aug 31, 2006
      View Source
      • 0 Attachment
        Gotcha.... I think.... leave it with me for the weekend... being
        friday afternoon my minds as tarp as a shack so to speak.

        Thanks again
        --- In ydn-javascript@yahoogroups.com, <dav.glass@...> wrote:
        >
        > Steve --
        >
        > That may actually be a coding issue 8-)
        >
        > The calendar returns an array of Javascript Date objects, what you
        are seeing is that JS will let you see it as a string, sortof..
        >
        > So if you grab the return from getSelectedDates and do something
        like:
        > var calDate = cal1.getSelectedDates()[0];
        > calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/'
        + calDate.getFullYear();You will get a value in calData like :
        8/31/2006
        >
        > See an example here:
        > http://blog.davglass.com/files/yui/cal2/
        >
        >
        >
        >
        > Dav Glass
        > dav.glass@...
        > davglass.com
        > 618.694.3476
        >
        > + Windows: n. - The most successful computer virus, ever. +
        > + A computer without a Microsoft operating system is like a dog
        > without bricks tied to its head +
        > + A Microsoft Certified Systems Engineer is to computing what a
        > McDonalds Certified Food Specialist is to fine cuisine +
        >
        > ----- Original Message ----
        > From: Steve <steve22_77@...>
        > To: ydn-javascript@yahoogroups.com
        > Sent: Thursday, August 31, 2006 8:55:21 PM
        > Subject: [ydn-javascript] Date Output
        >
        > Hi all,
        >
        > We are using the Yahoo calendar on our intranet (with much
        success -
        > thanks to everyone involved in the project), however we have come
        > across a small anomoly... When a user using IE selects a date
        the
        > date displays
        > Tue, Sep 12 00:00:00 UTC+1000 2006
        >
        > In firefox it is displayed
        > Tue, Sep 12 2006 00:00:00 UTC+1000
        >
        > We have found a work around - tell everyone to use IE
        >
        > however it would be nice if we could force it to return a set
        date
        > format regardless of browser such as yyyy-mm-dd.
        >
        > Thanks
        >
        > Steve
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.