jQWidgets Forums

jQuery UI Widgets Forums Grid Date format

Tagged: 

This topic contains 12 replies, has 4 voices, and was last updated by  Peter Stoev 11 years, 9 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Date format Posts
  • Date format #26731

    cosostones
    Participant

    Hello,

    I have a problem with the date format in the grid, I get a DateTime from my database and the grid convert it to a cultured format e.g. I have my dat plus two hours (or one depending summer time or not).

    Is there a way to avoid it ?

    Regards.

    Date format #26762

    Peter Stoev
    Keymaster

    Hi cosostones,

    I suggest you to look at the Data Sources help topic – http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm. It illustrates how you should bind the Grid and set format of the data fields.

    Example: { name: ‘SubmitDate’, type: ‘date’, format: “yyyy-MM-ddTHH:mm:ss-HH:mm” }

    Best Regards,
    Peter Stoev

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

    Date format #26802

    Hi,
    I have to show persian date instead of English date.I have to convert it somewhere.But i can’t found a way ,where i changed for it.

    Ex:I have to display 23-05-1392 instead of 14-08-2013 in Jqxgrid

    Plz help me,(Appreciated)

    Thanks,
    Manish

    Date format #26805

    cosostones
    Participant

    Hello Peter,

    I already tried to specifiy the format but the problem is still here.

    Regards.

    Date format #26809

    Peter Stoev
    Keymaster

    Hi cosostones,

    jqxGrid displays the Dates that you load into it. It does not add or remove hours from your dates. I suggest you to store your dates in UTC and then load them into the Grid.

    Best Regards,
    Peter Stoev

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

    Date format #26812

    Hi Peter,
    Can you look into my issue related to farsi/Persian date in column of jqxgrid.

    Thanks,
    Manish

    Date format #26814

    Peter Stoev
    Keymaster

    Hi Manish,

    According to me, you will have to apply Persion localization to the Grid – http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-localization.htm

    Best Regards,
    Peter Stoev

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

    Date format #26815

    Hi Peter,
    It only handles the display part of the string displayed in grid but not convert english date to persian.

    Plz suggest! Waiting for reply…

    Thanks,
    Manish

    Date format #26817

    cosostones
    Participant

    I’m sorry Peter but yes the grid add hours, I made a video to show you :

    http://screencast.com/t/JaJUwBqzuh

    The data are normally loaded but after the date are transformed.

    regards.

    Date format #26818

    Peter Stoev
    Keymaster

    Hi cosostones,

    The Grid does not add hours to your Dates. We use JavaScript Date Object – http://www.w3schools.com/js/js_obj_date.asp for working with Dates, but if you do not like how the default JavaScript Date Object works, you can load your Dates as Strings into the Grid. If your Server Date is in UTC, the Grid will display that Date in Local time as that is the way the JavaScript Date Object works.

    Best Regards,
    Peter Stoev

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

    Date format #26820

    cosostones
    Participant

    Okay thanks for your response I understand the problem.

    Regards.

    Date format #27143

    benitocas88
    Member

    Hi, i work with jqxgrid and specific property cellsformat, if I set ‘d’, this returns a format date. then I change ‘f1’ but the problem is if I type 8.99, automatically rounding 9 and don’t like this, not like rounding! Is possible deactivate rounding?

    Date format #27144

    Peter Stoev
    Keymaster

    Hi benitocas88,

    ‘d’ will return a formatted date in case your column datafield’s type is set to “date”. Otherwise, ‘d’ stands for a whole number, too.
    ‘f1’ format is for floating number with 1 decimal place so your cell values will be rounded to such with 1 decimal place.
    It seems that in your case you should use ‘f2’ as format.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.