Completed
Last Updated: 26 Jan 2022 10:26 by ADMIN
Release R1 2022 SP1
Grégory
Created on: 12 Jan 2022 10:08
Category: DateTimePicker
Type: Bug Report
0
RadDateTimePicker: Opening/Opened events are not raised

Add a RadDateTimePicker to the form and use the following code snippet:

        public RadForm1()
        {
            InitializeComponent();
            RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
             calendarBehavior.ShowTimePicker = true; 
            calendarBehavior.PopupControl.PopupOpening += PopupControl_PopupOpening;
            this.radDateTimePicker1.Opening+=radDateTimePicker1_Opening; 
        }

       //It is fired
        private void PopupControl_PopupOpening(object sender, CancelEventArgs args)
        {
            Console.WriteLine("PopupControl_PopupOpening");
        }

        //It is not fired is ShowTimePicker=true
        private void radDateTimePicker1_Opening(object sender, CancelEventArgs e)
        {
            Console.WriteLine("radDateTimePicker1_Opening");
        }

You will notice that the RadDateTimePicker.Opening event is not fired if the ShowTimePicker property is enabled.

Workaround: feel free to use the PopupControl.PopupOpening event.

 

0 comments