jQuery UI Widgets Forums Grid columntype: 'datetimeinput' Question

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 11 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • columntype: 'datetimeinput' Question #15260

    DavidSimmons
    Participant

    I am trying to determine how to use the column type: ‘datetimeinput’ and columnformat: ‘MM-dd-yyyy’ during editing but get a MM-dd-yyyy format value return not this format Sat Feb 16 2013 00:00:00 GMT-0600 (CST)? Is this possible or do I have to convert it before saving the value.

    columntype: 'datetimeinput' Question #15275

    Dimitar
    Participant

    Hello DavidSimmons,

    To do this, set the cellsformat column property to ‘d’ as shown in the demo Editing. A list of format strings can be found in the API Documentation of jqxDateTimeInput (see formatString property).

    Best Regards,
    Dimitar

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

    columntype: 'datetimeinput' Question #15311

    DavidSimmons
    Participant

    Here is what I have come up with so far to format the date in a MySQL needed format. It works accept for the last day of the month. There must be a better way to do this.

    { text: ‘FollowUp’, dataField: ‘FollowUp’, width: 160, editable: true, filterable: false, columntype: ‘datetimeinput’, cellsformat: ‘MM-dd-yyyy’,
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) {
    return oldvalue;
    } else {
    return newvalue.getFullYear()+’-‘+(newvalue.getMonth()+1)+’-‘+(newvalue.getDate()+1);
    }
    }
    },

    columntype: 'datetimeinput' Question #15423

    Dimitar
    Participant

    Hi DavidSimmons,

    We have tested the demos for the reported issue, but all works fine. Could you, please, give more details on your grid initialization and do you experience the same issue with any of the demos?

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.