jQWidgets Forums

jQuery UI Widgets Forums Grid Date format issues

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Date format issues #48886

    tayling
    Participant

    Hi
    I am using a json data object with a records like:
    {
    “JobNo”: “5620-2”,
    “Wc”: “1”,
    “Qty”: 10,
    “PartCode”: “42911-03”,
    “Description”: “STUB SHAFT – ITEM 03”,
    “Issued”: “14/12/11”,
    “Current”: “2”,
    “SentTo”: “CT250”,
    “airkit”: “Yes”,
    “drop”: 45,
    “ctof”: 55,
    “material”: “ms250”,
    “bearing”: “north”,
    “colour”: “red”,
    “cruisemaster”: “xp100”,
    “image”: “blum-CORNER_Installation-Guide.pdf”
    },
    The problem is to do with the SentTo date = I am passing is as dd/MM/yy – as we do in Australia.

    if I set the datafiles like:
    datafields: [
    { “name”: ‘JobNo’, “type”: ‘string’ },
    { “name”: ‘Wc’, “type”: ‘int’ },
    { “name”: ‘Qty’, “type”: ‘int’ },
    { “name”: ‘PartCode’, “type”: ‘string’ },
    { “name”: ‘Description’, “type”: ‘string’ },
    { “name”: ‘Issued’, “type”: ‘date’, “format”: ‘dd-MM-yy’ },
    { “name”: ‘Current’, “type”: ‘string’ },
    { “name”: ‘SentTo’, “type”: ‘string’ },
    { “name”: ‘airkit’, “type”: ‘string’ },
    { “name”: ‘drop’, “type”: ‘string’ },
    { “name”: ‘ctof’, “type”: ‘string’ },
    { “name”: ‘material’, “type”: ‘string’ },
    { “name”: ‘bearing’, “type”: ‘string’ },
    { “name”: ‘colour’, “type”: ‘string’ },
    { “name”: ‘cruisemaster’, “type”: ‘string’ },
    { “name”: ‘image’, “type”: ‘string’ }
    ],

    The grid appears but the dates are wrong – if i change the data to dd-MM-yy format – i.e. swap / for – I get the error:

    ReferenceError: getEra is not defined
    …ion(e){return typeof e===”boolean”},isObject:function(e){return(e&&(typeof …
    and the fgrid will not load

    If i leave the data as “dd/MM/yy” format abd change the datafield entry to
    { “name”: ‘Issued’, “type”: ‘date’, “format”: ‘dd/MM/yy’ },
    I get the same eerror.

    I know I am probably going to kick myself for a silly error but I would be vry grateful if someone could point it out.!

    Thanks
    Regards
    Tony Ayling

    Date format issues #48908

    Peter Stoev
    Keymaster

    Hi Tony,

    Thanks for the feedback.

    Actually, the problem is in us. The ‘yy’ year format brings to an issue with the getEra function. We will do our best to resolve that in the next update of jQWidgets.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.