DateTimePicker Dropdown Always Displayed

2 posts, 1 answers
  1. Mike
    Mike avatar
    1 posts
    Member since:
    Dec 2015

    Posted 28 Jan Link to this post

    Is there a way to keep the radDateTimePicker dropdown calendar locked open always or locked open until a selection is made regardless of focus?
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 29 Jan Link to this post

    Hello Mike,

    Thank you for writing.

    You should use the Closing event and cancel the close operation. For example:
    void radDateTimePicker1_Closing(object sender, Telerik.WinControls.UI.RadPopupClosingEventArgs args)
    {
        var calendar = radDateTimePicker1.DateTimePickerElement.CurrentBehavior as RadDateTimePickerCalendar;
        if (!calendar.PopupControl.Bounds.Contains(calendar.PopupControl.PointToClient(Cursor.Position)))
        {
            args.Cancel = args.CloseReason == RadPopupCloseReason.Mouse;
        }
    }
     
    Let me know if I can assist you further.
     
    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top