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

Re: Datatable: About XML and dates

Expand Messages
  • carltondickson
    Thanks for letting me know Jenny. As a workaround I put the date in the following format which should sort itself ok. 2007-03-13 15:45:06
    Message 1 of 3 , Mar 14, 2007
    • 0 Attachment
      Thanks for letting me know Jenny.

      As a workaround I put the date in the following format which should
      sort itself ok.

      2007-03-13 15:45:06

      --- In ydn-javascript@yahoogroups.com, "jennykhan" <jennyhan@...> wrote:
      >
      > Hi there,
      >
      > Sorry for any confusion. As I mentioned in an earlier thread (see item
      > 3 in http://tech.groups.yahoo.com/group/ydn-javascript/message/10696),
      > Column types like "number" or "date" only work right now if the data
      > is already is in the right format natively in JS (ie, your DataSource
      > is a local array or object). Unfortunately, data coming over XHR gets
      > dumped out as strings, and currently there is no mechanism to convert
      > the type. Please look forward to this functionality in a future release.
      >
      > Thanks,
      > Jenny
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "carltondickson"
      > <carltondickson@> wrote:
      > >
      > > How do the data types for the column work exactly? I have some xml
      > > that is returned from a XHR, the most important node is this one, with
      > > my date:
      > >
      > > ...
      > > <sent>2006-12-07 10:30:08</sent>
      > > ...
      > >
      > > Then when I set up my column set I use this...
      > >
      > > {key:"sent", text:"Date Sent", sortable:true, type:'date'},
      > >
      > > but I get an error saying oDate.getMonth() is not a function...it is
      > > trying to execute this function on a string which will obviously fail.
      > > How would I even pass a date object into the function that formats the
      > > date?
      > >
      > > I think maybe I am missing something here :(
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.