jQuery UI Widgets Forums Grid Grid Column Sorting for Date

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid Column Sorting for Date #23972

    rskbuvan
    Spectator

    Hi,

    I’ve a date column where the values from database rendered as below,

    Before Sorting
    ——————–

    02.11.2011
    06.21.2013
    09.20.2010
    02.11.2011
    06.26.2013

    Sorting – Asc
    ——————–

    02.11.2011
    02.11.2011
    06.21.2013
    06.26.2013
    09.20.2010

    Sorting – Desc
    ——————–

    09.20.2010
    06.21.2013
    06.26.2013
    02.11.2011
    02.11.2011

    This sorting is happening like a string in Alphabetical order (i.e. asc or desc) but in case of date it should sort as per the year, if I am not wrong?

    Please give me a suggestion.

    Thanks & Cheers,
    \_rssb

    Grid Column Sorting for Date #23982

    Dimitar
    Participant

    Hello rssb,

    Please make sure you have set the type property of your date datafield in the source to “date”, i.e.:

    { name: 'date', type: 'date' },

    Best Regards,
    Dimitar

    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.