jQWidgets Forums

jQuery UI Widgets Forums DataTable Cells Formating – Date

This topic contains 1 reply, has 2 voices, and was last updated by  Vladimir 9 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Cells Formating – Date #76795

    Francisco
    Participant

    Good morning people,

    I’ve got one more question very strange, let’s see if you have any tips for the following situation:

    I read an xml file, I get a date that is so, example: <dhEmi> 2015-08-27T00: 00: 00-03: 00 </ dhEmi>

    with php I get only what interests me, for example:
    substr ($ dhEmi, 0, 10) that returns me = 08.27.2015.

    Unless this record in the database so far everything is perfect.

    Now I creation a viewer, what I set as follows:

    var source = {

    {name: ’emission’, type ‘date’},

    $ (“# t_search”). jqxDataTable ({

    columns: [

    {text: ‘Issue’, dataField: ’emission’, cellsAlign ‘right’ align ‘left’, width: ‘100px’ cellsformat: ‘dd / mm / yyyy’},

    There, when I run, it returns the date but with one day less, it returns 8.26.2015, I can not imagine why, and more incredible is that the error occurs only for show, because if I get the date in 2015 -08-27 he thinks, but it shows day 26.8.2015

    Note: I’ve read these links: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-cellsformatting.htm
    and http://www.jqwidgets.com/community/topic/cellsformat-with-time/

    Thank you!

    Cells Formating – Date #76800

    Vladimir
    Participant

    Hello Francisco,

    I think you should take a look at this demo. It displays exactly how to do what you want to do.

    Also note that the cellsFormat property has capital F.
    Also note that months should be with capital MM in the formatting, mm is minutes.

    Best Regards,
    Vladimir

    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.