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

Re: [ydn-javascript] DateCellEditor and Submitted Date Format

Expand Messages
  • Satyam
    The Dates in DataTable are not stored in that ugly format, they are stored as native JavaScript Date objects which have their toString method set to display
    Message 1 of 3 , May 27, 2009
    • 0 Attachment
      The Dates in DataTable are not stored in that ugly format, they are
      stored as native JavaScript Date objects which have their toString
      method set to display them in that 'romantic' format (whenever I read
      that 'Romance Time' part I imagine some Eastern European violinist
      coming to my desk, like in a B-rate romantic movie).

      It is always good to have all values in their native formats. For
      example, if you were to store your Dates in MM/DD/YYYY format, if you
      sort by that column, it would fail, unless you also put a custom sort
      function. In the end, it gets you in a lot of trouble. So, the best is
      to parse any source of data from the external format into the native
      format and, if it is to be sent back to the server again, format it when
      you submit that data, but let everything on the client side run in their
      own native JavaScript formats.

      Satyam


      magneticat.development escribió:
      > Hello!
      >
      > I followed Satyam fantastic tutorial about Data Tables and all is working fine. I have just one problem - the data submitted by the DateCellEditor is in an ungodly format:
      >
      > Thu Nov 30 1980 10:20:21 GMT 0100 (Romance Standard Time)
      >
      > Is there some way to force the DateCellEditor to send instead the data in another format, in particular MM/DD/YYYY?
      >
      > Thanks!
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - www.avg.com
      > Version: 8.5.339 / Virus Database: 270.12.40/2135 - Release Date: 05/26/09 08:53:00
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.