Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
320
Simple day view navigation gives wrong dates
posted

I have this simple code checked this with 10.2 and 11.2 version both give wrong NewDate inside the events ( ActiveDayChanging and ActiveDayChanged events) when navigating dates (right left buttons).

WebDayView wdv = new WebDayView();
WebScheduleInfo wsi = new WebScheduleInfo();
WebDateChooser wdc = new WebDateChooser();

protected void Page_Load(object sender, EventArgs e)
{
wdc.ValueChanged += new WebDateChooser.ValueChangedEventHandler(wdc_ValueChanged);
wsi.ActiveDayChanged += new ActiveDayChangedEventHandler(wsi_ActiveDayChanged);
wsi.ActiveDayChanging += new ActiveDayChangingEventHandler(wsi_ActiveDayChanging);
wdv.EnableKeyboardNavigation = true;
  wdv.NavigationButtonsVisible = true;
wdv.WebScheduleInfo = wsi;
wdc.AutoPostBack.ValueChanged = true;
form1.Controls.Add(wdc);
form1.Controls.Add(wdv);
form1.Controls.Add(wsi);

}

void wsi_ActiveDayChanging(object sender, ActiveDayChangingEventArgs e)
{

}

void wsi_ActiveDayChanged(object sender, ActiveDayChangedEventArgs e)
{
wdc.Value = e.NewDate.ToString();
}

void wdc_ValueChanged(object sender, WebDateChooser.WebDateChooserEventArgs e)
{
wsi.ActiveDayUtc = new Infragistics.WebUI.Shared.SmartDate((DateTime)e.Value);
}