Disallow 3-digit year in kendo.dateParse()?

2 posts, 0 answers
  1. Troy
    Troy avatar
    10 posts
    Member since:
    Mar 2012

    Posted 17 Mar 2014 Link to this post

    Wondering if there is a way to impose some sort of strict parsing so the following will be considered invalid instead of parsed into a future date:

    kendo.parseDate('02/02/201', ['MM/dd/yy']); // Parsed into Sun Feb 02 2020 00:00:00 GMT-0800 (PST)

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 19 Mar 2014 Link to this post

    Hello Troy,

    The produced date result is just what is expected, you are passing three digits instead of two like you specified in the format. So it uses these two digits exactly after the slash


    kendo.parseDate('02/02/201', ['MM/dd/yy']);

    The extra digit that you added is not needed for the format that you specified.

    Kind Regards,
    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top