void dtpStartDate_ValueChanged(object sender, EventArgs e) { dtStart = dtpStartDate.Value; if (dtEnd - dtStart < new TimeSpan(1, 0, 0, 0, 0)) { dtEnd = dtStart + new TimeSpan(1, 0, 0, 0, 0); dtpEndDate.Value = dtEnd; } }