Completed
Last Updated: 07 Oct 2014 15:11 by ADMIN
ADMIN
Dimitar
Created on: 28 Jul 2014 14:31
Category: Editors
Type: Bug Report
0
FIX. RadDateTimePicker - the time is incorrectly set when the spin button is clicked and the control has specific Min/Max dates.
To reproduce use the following configuration for the DateTimePicker:
public Form1()
{
    InitializeComponent();
    DateTime start = DateTime.Parse("2012/7/1 00:00:00");
    this.RadDateTimePicker1.ShowUpDown = true;
  
    this.RadDateTimePicker1.Format = DateTimePickerFormat.Custom;
    this.RadDateTimePicker1.DateTimePickerElement.ShowCurrentTime = false;
    this.RadDateTimePicker1.MinDate = start;
    this.RadDateTimePicker1.DateTimePickerElement.CustomFormat = "HH:mm";
    this.RadDateTimePicker1.MaxDate = start + TimeSpan.FromMinutes(1440);
    this.RadDateTimePicker1.Value = start +TimeSpan.FromMinutes(1);
    this.RadDateTimePicker1.Enter += new EventHandler(this.ConfigStartDelayTime_Enter);        
}

void ConfigStartDelayTime_Enter(object sender, EventArgs e)
{
    RadMaskedEditBoxElement element = this.RadDateTimePicker1.DateTimePickerElement.TextBoxElement.TextBoxItem.Parent as RadMaskedEditBoxElement;
    MaskDateTimeProvider provider = element.Provider as MaskDateTimeProvider;
    provider.SelectLastItem();
}
0 comments