Results 1 to 3 of 3

Thread: DateFormat Hell - I beg for a little help

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    12

    Default DateFormat Hell - I beg for a little help

    Hi everyone, I've a troble with a date field in a store.
    The dates that come are in format "29/04/2011 12:35", for instance. And i have my field configured with type:'date', dateFormat:'d/m/Y H:i'.

    I've tried with that dateFormat and without it, and with the date i've written upwards, it works well, BUT.... the data i got from my system, wich time is 00:00 doesn't come like that (00:00) but comes like "0:00". That unique '0' makes the store to don't understand the dates, and get "undefined" values in my column.

    Is there a way to write two dateformats, or a wildcard, o something that could make this works?
    After several hous the only workaround i thought i have, is to make two columns, and in the load event, do a foreach and parse for myself from the source string and create a new date column.

    Thanx in advance, and sorry about my english,

    Regards

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    It sounds like a problem on the server side, when the data is being serialized to JSON.

    If you inspect the JSON response with Firefox/Firebug, are the datetime stamps missing zeros there? If so, then it's an issue you must cure on the server side...

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    12

    Default

    Yes, the data in the JSON response is like this:

    "29/04/2011 16:34", <-- when time is other than 00:00

    "16/04/2011 0:00", <-- and my friend.....

    Then, there isn't any way to handle it? I think that the fastest way will be to do a "for" on the store, and modify the field by hand....

    EDIT: i got it!! in deed, it was the server configuration. All the hours with one digit came with only one, and now they come with 2. thanx!

Similar Threads

  1. What the hell is mon and mun?
    By jsakalos in forum Community Discussion
    Replies: 7
    Last Post: 20 Sep 2009, 11:52 PM
  2. ID hell ...
    By avsomeren in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 25 Jul 2009, 5:25 AM
  3. Ahh the CSS hell - Need education
    By Mango_lier in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 9 Sep 2008, 2:13 AM
  4. Dependency Hell
    By SLerman in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 May 2008, 7:54 AM
  5. [Ext 1.1.1 changelog] What the hell...
    By jheid in forum Community Discussion
    Replies: 9
    Last Post: 31 Aug 2007, 10:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •