Hi,
I'm using 2 DatePricker controls (start date & end date) on a page that displays a customer's orders. When the page is initialized the following code is executed:
Quote:
if (!Page.IsPostBack)
{
eoStart.SelectedDate = DateTime.Now.AddDays(-1);
eoEnd.SelectedDate = DateTime.Now;
}
Orders orders = new Orders(userid, eoStart.SelectedDate, eoEnd.SelectedDate);
rptOrders.DataSource = orders.GetOrders();
rptOrders.DataBind();
This code works as intended and passes in a date/time value that includes the current hour, minute & seconds. The problem is when the page is posted back the SelectedDate property gives a value that is rounded up to midnight for the selected dates.
IMO the control should round the date when the SelectedDate property is set so it behaves consistently.
Thanks,
cn