jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Date format Date format #19186

    miklosz
    Member

    Hi,

    I did overcome this issue in completely different way. I process andformat date in grid_data.php file :

    $temp_date = date_parse($row[‘CompletionDueDate’]);
    $new_date = $temp_date[“day”].’-‘.$temp_date[“month”].’-‘.$temp_date[“year”];

    And then cellsformat works as required. Hope it might help others.

    Thanks anyway,

    in reply to: Date format Date format #19185

    miklosz
    Member

    So … it looks like this:

    var source =
    {
    datatype: “json”,
    datafields: [
    // Jul 30 2012 12:04:00:000PM – it’s like date is sent here
    { name: ‘CompletionDueDate’, type: ‘date’, format: ‘MMM d yyyy HH:mm:ss.fff’},
    { name: ‘ToolReference’},
    { name: ‘CustomerName’},
    { name: ‘CurrentProcess’}
    ],
    url: ‘grid_data.php’,
    cache: false
    };

    I tried several format patterns, nothing works.

    Json record passed is :

    [{“CompletionDueDate”:”Feb 23 2012 09:15:00:000AM”,
    “ToolReference”:”11111″,
    “CustomerName”:”test1″
    ,”CurrentProcess”:”P1″}, …

    And later in grid settings

    columns: [
    { text: ‘Due Date’, datafield: ‘CompletionDueDate’, width: 200, cellsformat: ‘d’ },
    { text: ‘Kit No’, datafield: ‘ToolReference’, width: 60},
    { text: ‘Customer Name’, datafield: ‘CustomerName’, width: 230 },
    { text: ‘Process’,datafield: ‘CurrentProcess’,width: 200 }

    Whatever cellsformat I set, even stupid one, looks like it’s not read by grid at all.

    Thanks for any help.

    in reply to: Date format Date format #19160

    miklosz
    Member

    I should have added that date is taken from MS SQL database , and is in format :

    Jul 30 2012 12:04:00:000PM.

    I tried several cellsformat dates and nothing works. I would like to have it displayed as

    dd-MM-yyyy.

    Thanks.

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