Date picker is Delocating from its position

2 posts, 0 answers
  1. Sandeep Pulkundwar
    Sandeep Pulkundwar avatar
    23 posts
    Member since:
    Jan 2009

    Posted 29 May 2009 Link to this post

    When i click on the date control to change the date and if i don't select the date and click outside other than calendar, it remains in its position. Even if i click on the Arrow button to close it the calendar dislocates itself to some other postion. This gives a very weird behaviour to the dataTime picker.
    Please can you tell me why is this happening or am i missing some property settings for it.
  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 01 Jun 2009 Link to this post

    Hi Sandeep Pulkundwar,

    1.  As far as we understand your case, you are opening the PopUp Calendar. When you click anywhere outside the Calendar area, it does not close and stays opened until you select a date. Could you please confirm that this is your issue? If this is your case please send us a very simple project which demonstrates it or you can send us the steps to reproduce the incorrect behavior.

    2. Regarding your second issue with the deallocation of the popup  RadCalendar from RadDateTimePicker, we have prepared a sample workaround:

        2.1. Please subscribe to the LocationChanged event of RadDateTimePicker PopupContro:
       RadDateTimePickerCalendar calendar = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;             
       calendar.PopupControl.LocationChanged += new EventHandler(PopupControl_LocationChanged); 

        2.2. In the LocationChanged event handler please modify the Popup Location 

     void PopupControl_LocationChanged(object sender, EventArgs e)  
                Rectangle screenRectangle = this.radDateTimePicker1.RectangleToScreen(this.radDateTimePicker1.ClientRectangle);  
                RadDateTimePickerCalendar calendar = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;  
    Point wantedPoint = new Point(screenRectangle.X, screenRectangle.Bottom);  
                if (calendar.PopupControl.Location != wantedPoint)  
                    calendar.PopupControl.Location = wantedPoint;  

    We hope this workaround will help you. We are looking forward to your reply regarding the first issue.

    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top