jQuery UI Widgets Forums Grid Problem with date format

This topic contains 1 reply, has 1 voice, and was last updated by  thadus 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Problem with date format #31254

    thadus
    Member

    Hello guys!

    I’m with a problem in datetimeinput fields of a grid. When I change the values in grid, the date seems to be alright, in the format that was specified (dd/MM/yyyy HH:mm). But the value sent to server-side is in another format (something like “Tue Oct 29 2013 00:00:00 GMT-0200 (Hora oficial do Brasil)”).

    I’ve tried to make these things:

    – In source > datafields

    { name: 'inicioconsolidacao', type: 'date', format: 'dd/MM/yyyy HH:mm' }

    – In columns

    { text: 'Inicio Consolidacao',
    datafield: 'inicioconsolidacao',
    width: 140,
    columntype: 'datetimeinput',
    cellsformat: 'dd/MM/yyyy HH:mm',
    initeditor: function (row, value, editor) { editor.jqxDateTimeInput({ culture: 'pt-BR' }); }
    }

    But doesn’t work. Have something that I made wrong?

    Thanks for support, sorry by bad english.
    Best regards.

    Problem with date format #31256

    thadus
    Member

    Another thing: I’m sending data by Ajax, with the updaterow method.

    $("#jqxgrid").on('cellendedit', function (event) {
    var args = event.args;
    $(this).jqxGrid('updaterow', args.rowindex);
    });
    updaterow: function (rowid, rowdata, commit) {
    // synchronize with the server - send update command
    $.ajax({
    url: 'inc/operacional/viagens_jd_ajax',
    data: {
    (...)
    inicioconsolidacao: rowdata.inicioconsolidacao
    (...)
    },
    success: function (data, status, xhr) {
    // update command is executed.
    commit(true);
    },
    error: function () {
    // cancel changes.
    commit(false);
    }
    });
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.