Incorrect Date Sorting in Grid (Ascending order only)

12 posts, 0 answers
  1. Jason
    Jason avatar
    16 posts
    Member since:
    Jun 2012

    Posted 13 Mar 2013 Link to this post

    I am using Kendo UI Web v2012.3.1315.

    On my grid there is a DOB field for Date of Birth.  I have attached the DOB values that show in the grid.

    I build my data as a string in JSON format here is an example:
    { "intReportID" : "1245", "sysReportNum" : "12-336", "sysAddress" : "9TH Ave SE & Hill St SE", "sysReportDate" : "1/5/2012 8:57:00 PM", "intUnitType" : "1", "vchLastName" : "PROUSE", "vchFirstName" : "CRYSTAL", "chrGender" : "F", "datDOB" : "3/3/1979 12:00:00 AM", "bolVehOwnerSame" : "False", "Gender" : "Female" }
    The columns are also defined in JSON:
    { field: "datDOB", title: "DOB", format: "{0:M/d/yyyy}" }
    Same with the Schema Model:
    {fields: { "datDOB" : { type: "date"}}}
    The DOB column sorts mostly fine.  In decending order the blanks are all at the end of the grid which is okay.  But in Ascending order the blanks start at position 49 and position 48 is incorrect:
    47: 11/11/1958
    48: 1/11/1969
    49-62: blank
    63: 3/25/1959
    You would think Ascending would put the blanks at the start and not mess up the sort order of one item.

    Any ideas?
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 15 Mar 2013 Link to this post

    Hello,

    Please update your js file, now this issue is resolved.

    http://jsfiddle.net/jayeshgoyani/pke9q/2/

    Note : In Previous version it applied sorting only on data (means it ignores the null value).

    Thanks.
    Jayesh Goyani

  3. Kendo UI is VS 2017 Ready
  4. Jason
    Jason avatar
    16 posts
    Member since:
    Jun 2012

    Posted 15 Mar 2013 Link to this post

    Which file(s) should I update?  I am using the latest version do you want me to use the beta one?
  5. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 15 Mar 2013 Link to this post

    Hello,

    Sorry, its my mistake.

    I also used same version.

    http://cdn.kendostatic.com/2012.3.1315/js/kendo.all.min.js

    I am not able to reproduce this issue.

    Thanks,
    Jayesh Goyani
  6. Jason
    Jason avatar
    16 posts
    Member since:
    Jun 2012

    Posted 15 Mar 2013 Link to this post

    The js files I am using are:

    jquery.min.js (jQuery v1.8.2 jquery.com)
    kendo.web.min.js (v2012.3.1315)

    They were in the Kendo UI Web Q3 2012/js folder.  I don't see the 'all' file.
  7. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 15 Mar 2013 Link to this post

    Hello,

    Please check my attached files for reference.

    Thanks,
    Jayesh Goyani
  8. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 15 Mar 2013 Link to this post

    Hello,

    if possible then please create separate test page/project to test this functionality.

    Thanks,
    Jayesh Goyani
  9. Jason
    Jason avatar
    16 posts
    Member since:
    Jun 2012

    Posted 15 Mar 2013 Link to this post

    Here is my Fiddle page.

    http://jsfiddle.net/NqrDS/

    Set the page size to 50 and page 1 and 2 will have the block of blanks in Chrome.  In IE the blanks are not sorted at all they are distributed throughout.
  10. Hamlet
    Hamlet avatar
    2 posts
    Member since:
    Aug 2015

    Posted 28 Aug 2015 Link to this post

    After 2 years from this question, I have the same issue now. Any ideas ?
  11. Jason
    Jason avatar
    16 posts
    Member since:
    Jun 2012

    Posted 28 Aug 2015 Link to this post

    I took a look at our website and the issue is still present.  I have not updated the Kendo controls though so I am probably way out of date with the code.  When sorting descending the nulls/blanks are at the end, but the ascending sort puts them in the middle of the result set (in Chrome).

    Nice to know it wasn't only me!

  12. Hamlet
    Hamlet avatar
    2 posts
    Member since:
    Aug 2015

    Posted 28 Aug 2015 in reply to Jason Link to this post

    Thanks for Your response mate. Yup. You're not alone with that issue. I don't know what's the problem. 
  13. Sahir
    Sahir avatar
    4 posts
    Member since:
    Jul 2016

    Posted 13 Aug Link to this post

    I have a date sorting issue in  my application. Kindly help me f you can?

    https://www.telerik.com/account/support-tickets/view-ticket?threadid=1056679

    https://stackoverflow.com/questions/38896594/why-kendo-ui-grid-date-is-not-sorting-properly

Back to Top
Kendo UI is VS 2017 Ready