Hi,
I need to validate the start and End periods while adding event.
i have the following things in asp.net code-behind
Scheduler.Config.xml_date = "%m/%d/%Y %H:%i"
Scheduler.Config.details_on_create = True
Scheduler.Config.details_on_dblclick = True
Dim js As New List(Of String)
js.Add("scheduler.attachEvent('onEventSave',function(id,data,is_new_event){" & _
"var isValid= validateMe(id,data,is_new_event); return isValid;})")
Scheduler.BeforeInit = js
in my design view, i have the definition for validateMe
function validateMe(id, data, is_new_event) {
if (!data.text || $.trim(data.text)=='') {
alert("Subject can not be empty");
return false;
}
//alert(data.start_date);
// alert(data.end_date);
if (data.start_date > data.end_date) {
alert("Start Date should be less than End date");
return false;
}
return true;
}
this validation not working for start and end dates… when i put alert, its returning both as are same dates, even though i have selected a past date for end_date and future one for start_date…
Please guide what is wrong in here
Thanking you in advance!