jQuery UI Widgets Forums Grid Problem with date column in jqxgrid

This topic contains 7 replies, has 3 voices, and was last updated by  Manu Vashishtha 4 years, 11 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Problem with date column in jqxgrid #103507

    Manu Vashishtha
    Participant

    Dear Sir

    I am facing a problem in jqxgrid date column. I am binding the grid data from database with a date column of format “dd/MM/yyyy”. When I am updating the row then format of date column is changed to mm/dd/yyyy . This happens only when we have day less than 12. I have created an example for this in jsfiddle: js fiddle example. When you update the row by clicking the button and then click on the date type cell of same row then day is changed to month.
    Its working fine when I convert date string(“dd/MM/yyyy”) to javascript date[new date()]. But I cannot convert the string to date every time because I have to bind the row data as it is and its not easy for me to convert every time. Is there any other way to do it like I have to set a property or call a method.

    Its urgent for my project. Please help me if you have solution for this.

    Thanks & Regards
    Manu vashishtha

    Problem with date column in jqxgrid #103532

    Hristo
    Participant

    Hello Manu Vashishtha,

    You could use the format member to the ‘datafield’ which is relevant to the date.
    Please, take a look at this forum topic.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Problem with date column in jqxgrid #103568

    Manu Vashishtha
    Participant

    Hello Hristo Hristov,

    Thank you for your response.
    I already tried this in my project. This is working fine for showing the data in grid but there is a problem when I have to edit the row and month is less than 12. I have attached the example with using “format” property in “datafield”:–Please Check the example...

    Thanks & Regards,
    Manu Vashishtha

    Problem with date column in jqxgrid #103656

    Hristo
    Participant

    Hello Manu Vashishtha,

    Could you clarify it?
    It seems the update is valid.
    When using the buttons in your example to update the selected row it set date “10/09/2018” as it is set.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    Problem with date column in jqxgrid #103809

    Manu Vashishtha
    Participant

    Hello Hristo,

    You are right it updates the row but problem arises when you click on the same cell(date type) which is updated.
    Then, the day is changed into month.

    Thanks & Regards,
    Manu Vashishtha

    Problem with date column in jqxgrid #106093

    tong123123
    Participant

    “it updates the row but problem arises when you click on the same cell(date type) which is updated.
    Then, the day is changed into month.”

    What is the final solution then?

    Problem with date column in jqxgrid #106175

    Hristo
    Participant

    Hello tong123123,

    I would like to suggest you try to parse the new value with the Date” object then add as records.
    Please, take a look at this example.
    Meanwhile, I will create a work item to discuss this scenario.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    Problem with date column in jqxgrid #107701

    Manu Vashishtha
    Participant

    Hello Hristo,
    I have also resolved this problem by converting value to date object. And it is working fine for me now.

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

You must be logged in to reply to this topic.