datetimepicker validation for - End date must occur after

2 posts, 0 answers
  1. Rsevern
    Rsevern avatar
    2 posts
    Member since:
    May 2015

    Posted 14 May 2015 Link to this post

    Hi all,

    When using the datetimepicker, is there built-in validation to ensure that the end date and time occur after the start date and time?  An error is returned however there is no message.  Can it be disabled or can I intercept to give it more meaning?

    Thank you,
      
  2. Rsevern
    Rsevern avatar
    2 posts
    Member since:
    May 2015

    Posted 15 May 2015 in reply to Rsevern Link to this post

    Sorted
    The validaiton is added to the 'end' field for the datetimepicker by kendo.web.mis.js (see snippet below).
    My issue was that it was returning an error icon, but no meaningful message.  I used the data-datecompare-msg attribute on the input element in my cshtml file to give it a meaningful string.

    Example: data-datecompare-msg="End date must be greater than and so on"

    kendo.web.mis.js

    end: {
    type: "date", validation: { required: !0,
    dateCompare: { value: d, message: "End date should be greater than or
    equal to the start date" } } },

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top