Click here to Skip to main content
15,885,742 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,

I have tried to write code asp.net in clientsideevent, in that i have no idea about How to write code enddate greater than startdate if end date less than startdate,enddate automatically changed in column.

I have two column
startdate:
enddate:

if you know plz, let me know.
thanks,
Posted
Comments
Suvendu Shekhar Giri 28-Jul-15 9:35am    
What have you tried so far?
What clue we have about your code to suggest a solution?
kalaiselvan Indirajith 28-Jul-15 9:45am    
Hi,

this is i have write in enddate at clientsideevent

function(s, e)
{
SetDifference() ;
{
var diff = CheckDifference();
}

function CheckDifference()
{
var startDate = new Date();
var endDate = new Date();
var difference = -1;
startDate = clientStartDate.GetDate();
if (startDate != null)
{
endDate = clientEndDate.GetDate();
var startTime = startDate.getTime();
var endTime = endDate.getTime();
difference = (endTime - startTime) / 86400000;

}
if (difference < 0)
{
clientEndDate.SetValue(startDate);
}
return difference;

}
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900