How to make endDate's date choose only after startdate's date ASP.NET

Refresh

5 days ago

Views

18 time

0

I have the current code that make sure the attribute "min" is only today or after. How to make sure that when i choose startDate, I want to make sure enddate is later then the chosen startDate.

endDateTb.Attributes["min"] = DateTime.Now.ToString("yyyy-MM-dd");
startDateTb.Attributes["min"] = DateTime.Now.ToString("yyyy-MM-dd");

1 answers

0

Вы можете просто сделать это:

DateTime startDay = DateTime.Now;

DateTime endDay = DateTime.Now.AddSeconds( 15 ); //