jQWidgets Forums

jQuery UI Widgets Forums Grid Date – Problem with cellsformat

This topic contains 5 replies, has 3 voices, and was last updated by  Murali 10 years, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Date – Problem with cellsformat #53088

    Emanuel
    Participant

    Hello,

    I have multiple grids in use with datafields of type date. These date columns are formatted via cellsformat to “dd.MM.yyyy HH:mm:ss”. This works fine in all but one grid and I cannot find any hint why it won’t work with this one grid.

    Column definition:

    {
    	text : 'Lokaler Verarbeitungsstart',
    	datafield : 'localProcessingStart',
    	cellsformat : "dd.MM.yyyy HH:mm:ss",
    	cellsrenderer : stateUnseenRenderer,
    	width : 180,
    	sort : 30
    }
    

    Datafield definition:

    {
    	name : 'localProcessingStart',
    	type : 'date'
    }
    

    This do not differ from the definition of the other grids, though (it isn’t the cellsrenderer that prevents the correct cell formatting).

    I got the data via JSON (for the grid that doesn’t format correctly):

    [{"ormId":1835,"documentId":"3FB45971-E5FB-4D49-9322-105BD258717E","transactionIdentifier":"7b70bc18-284d-4d69-a27d-6182d7cc3252.xml","senderEmail":"null","registrationNumber":"...","dataTarget":"...","dataFlow":"...","specification":"...","localProcessingStart":"Apr 15, 2014 9:00:43 AM","processingEnd":"Apr 15, 2014 9:01:00 AM","software":"...","state":"WARNING","protocolLocation":"...","seen":false,"rawFolder":"...","casesCount":67,"errorCasesCount":0}]
    

    The JSON for a grid that format the data correctly:

    
    [{"ormId":1730,"documentId":"2101452F-415E-442A-9411-348E9907E099","transactionIdentifier":"e283d317-5f54-4abd-8326-e1b149b003ba.xml","senderEmail":"null","registrationNumber":"...","localProcessingStart":"Apr 3, 2014 1:04:38 PM","taskId":"694299D6-7906-443E-829E-DCDE41D00674","seen":true}]
    

    Are there any known issues that prevents a date field from formatting?

    Tested with version 3.0.4 and 3.2.2. Occurs in FF 28 and Chrome 30.0.

    Thanks in advance,
    Emanuel

    Date – Problem with cellsformat #53092

    Peter Stoev
    Keymaster

    Hi Emanuel,

    Due to the reason that your date’s format is not standard, you will have to specify its format in the datafield of the source object as well. An example of such thing is available on: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Date – Problem with cellsformat #53098

    Emanuel
    Participant

    Hi Peter,

    thank you. I originally tried to format the date on the server side (same format “dd.MM.yyyy HH:mm:ss”) with these results:

    – The “normal working” grids display it correctly and the grid recognizes this field as date type (date filter dialog on that column)
    – The “problematic” grid displays it correctly but the grid does not recognize this field as date type but as string (the filter dialog has string operating filter conditions)

    Also: The “normal working” grids don’t seem to require the date to be preformatted like I wrote in the first post.

    Thanks again for any idea,
    Emanuel

    Date – Problem with cellsformat #53101

    Peter Stoev
    Keymaster

    Hi Emanuel,

    I think you misunderstood me. The “format” property of the source object’s datafield which is with type: “date” should be set to match to the Format of the Data that you want to load.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Date – Problem with cellsformat #53109

    Emanuel
    Participant

    Ah, okay. Yes, I tried also the format attribute after reading the example but this does not work either.

    I try to find a causative difference between the grids that prevents the cellformatting and will hopefully post it here.

    Thanks,
    Emanuel

    Date – Problem with cellsformat #59987

    Murali
    Participant

    Hi, I am facing problem in Chrome browser for time zone problem in my jqwidgets grid controll.In my DB my date and time display as
    ‘2014-09-23 19:39:00.000′ but in grid its shows as ’09/24/2014 01:09’ can any one help us in this issue.

    In IE and FireFox its works well.Particularly in Chrome i am facing this problem.

    Thanks,
    Murali

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.