Calendar Extendar is not showing Starting Date of one textbox to selected date of another textbox

倖福魔咒の 提交于 2019-12-02 09:30:52

Quote from the first link in a google search.

The SelectedDate of the CalendarExtender is just to set an initial selected date on the calendar.

You can't use is to get the last selected date by the user. The selectedDate property isn't updated to the date the user selects!!

So instead, you need to get the date from the textbox not the calendar extender.

protected void txtSRPStartDate_TextChanged(object sender, EventArgs e)
{
    txtSRPEndingDate_CalendarExtender.StartDate = Convert.ToDateTime(txtSRPStartDate.Text);
    txtSRPEndingDate_CalendarExtender.EndDate = DateTime.Now;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!