Event Starts : <SharePoint:DateTimeControl ID="dtEventStarts" LocaleId="2057" runat="server" />
Event Ends : <SharePoint:DateTimeControl ID="dtEventEnds" LocaleId="2057" runat="server" />
//Compare the start date and End Date of without recurrance patter
function validatePlainStartDateAndEndDatePattern(source, args)
{
var chkEventRepeatsControl = document.getElementById('<%= chkEventRepeats.ClientID %>'); //get the check box value for testing event is recurrence or not
if (!chkEventRepeatsControl.checked)
{
var eventStartDateString = document.getElementById('<%=dtEventStarts.Controls[0].ClientID%>').value;
var startdateDTA = eventStartDateString.split("/");
var actStartDate = new Date(startdateDTA[2], startdateDTA[1], startdateDTA[0], (document.getElementById('<%=dtEventStarts.Controls[1].ClientID%>').value).replace(":", ""), document.getElementById('<%=dtEventStarts.Controls[2].ClientID%>').value);
alert(actStartDate);
var eventEndDateString = document.getElementById('<%=dtEventEnds.Controls[0].ClientID%>').value;
var EndDateDTA = eventEndDateString.split("/");
var actEndDate = new Date(EndDateDTA[2], EndDateDTA[1], EndDateDTA[0], (document.getElementById('<%=dtEventEnds.Controls[1].ClientID%>').value).replace(":", ""), document.getElementById('<%=dtEventEnds.Controls[2].ClientID%>').value);
if (actStartDate.getTime() < actEndDate.getTime())
{
args.IsValid = true;
}
else{
args.IsValid = false;
}
}
}