Unplanned
Last Updated: 29 Mar 2016 11:57 by ADMIN
ADMIN
Dimitar
Created on: 16 Apr 2015 15:09
Category: Editors
Type: Bug Report
2
FIX. RadDateTimePicker - the value is not updated when changed from ValueChanged event.
To reproduce:
public Form1()
{
    InitializeComponent();
    AddDateTime();
    radDateTimePicker1.ValueChanged += radDateTimePicker1_ValueChanged;
  
    radDateTimePicker1.Format = DateTimePickerFormat.Custom;
    radDateTimePicker1.CustomFormat = "dd/MM/yyyy HH:mm";

    AddButton();

}

void radDateTimePicker1_ValueChanged(object sender, EventArgs e)
{
    if (radDateTimePicker1.Value.Date.Hour == 0)
    {
        var date = radDateTimePicker1.Value.Date;
        radDateTimePicker1.Value = new DateTime(date.Year, date.Month, date.Day, 23, 59, 0);
    }
   
}

Workaround: 
Refocus the control and the value will be updated.
0 comments