jQWidgets Forums

jQuery UI Widgets Forums Grid Date datatype issue.

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Date datatype issue. #58397

    hemant.kalal
    Participant

    Hi ,

    I have a data source as

    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘ID’, type: ‘string’ },
    { name: ‘LinkFilenameNoMenu’, type: ‘string’ },
    { name: ‘Description0’, type: ‘string’ },
    { name: ‘Created’, type: ‘date’ },
    { name: ‘Number_x0020_of_x0020_Pages’, type: ‘number’ },
    { name: ‘Document_x0020_Size’, type: ‘number’ },
    { name: ‘Parent’, type: ‘string’ }
    ],
    id: ‘ID’,
    localdata: finalString
    };

    in which { name: ‘Created’, type: ‘date’ }, is a date column and it is showing data in UTC format “Tue Jun 17 10:18:41 UTC+0530 2014” but I want it to be in US format like “06/17/2014 10:18:41 AM”, if I make the datatype as string it solves my issue but I don’t want to change the datatype as I want it for filter.

    Please help me fix this issue.

    Thanks & Regards
    Hemant.

    Date datatype issue. #58398

    Peter Stoev
    Keymaster

    Hi Hemant,

    The date format means that from your String which you pass from your Data Source, the Grid builds a JavaScript Date object. If you want to format the display of your Dates inside your Grid Columns, set the “cellsformat” property of your column as we do in our online demos. By doing that, you will be able to display your dates in the format which you wish.

    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.