This is a migrated thread and some comments may be shown as answers.

datetimepicker validation for - End date must occur after

1 Answer 126 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rsevern
Top achievements
Rank 1
Rsevern asked on 14 May 2015, 11:28 AM
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,
  

1 Answer, 1 is accepted

Sort by
0
Rsevern
Top achievements
Rank 1
answered on 15 May 2015, 11:32 AM

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" } } },

Tags
Scheduler
Asked by
Rsevern
Top achievements
Rank 1
Answers by
Rsevern
Top achievements
Rank 1
Share this question
or