RadTimePicker's popup does not close when RadDatePicker's popup is opened

8 posts, 0 answers
  1. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 30 May 2012 Link to this post

    Hello,

    I am using Telerik ver 2012.1.411.35. On a UI i have a RadDatePicker and a RadTimePicker. When I open the RadTimePicker's popup and then open RadDatePicker's popup, bot remain open.

    To demonstrate I have created a fresh web app in VS and added both the controls on the UI. Please see the attachment. Is this a known behavior?

    Thanks
    Rohit
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 May 2012 Link to this post

    Hi,

    I could replicate the issue. Try the following code snippet to overcome the issue.

    JS:
    <script type="text/javascript">
     function OnPopupOpening(sender,args)
     {
            var item = $find("<%=RadTimePicker1.ClientID %>");
            if (item.isTimePopupVisible())
            {
                item.hideTimePopup();
            }
     }
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 30 May 2012 Link to this post

    Thanks Princy,

    Yes that one is the most obvious workaround for the issue. Could Telerik also provide a fix in the future?

    Thanks
    Rohit Kamble
  5. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 31 May 2012 Link to this post

    Hi Rohit Kamble,

    This issue does not happen on our online demos here:
    http://demos.telerik.com/aspnet-ajax/calendar/examples/datetimepicker/accessibility/defaultcs.aspx
    However programmatic it is possible to open both the calendar and the time view, therefore this is not a bug and we will not change the behaviour.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. heyrohit
    heyrohit avatar
    10 posts
    Member since:
    Feb 2010

    Posted 31 May 2012 Link to this post

    Hi Vasil,

    The demo in the link uses a RadDateTimePicker instead of a RadDatePicker. This issue only occurs with RadDatePicker. In my example i just have added the markup as shown in the attachment.

    Thanks
    Rohit Kamble
  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 04 Jun 2012 Link to this post

    Hello Rohit Kamble,

    By design the RadTimePicker inherits RadDateTimePicker. And RadDateTimePicker inherits RadDatePicker.

    The RadDatePicker has some function that finds all popups and hide them. RadTimePicker has the same function for the TimeViews and the inherited one for the Calendars. So when clicking the RadTimePicker it can find both types of view and close them. However the DatePicker does not know about the TimeView popups, and can not find them or close them.

    Never the less, TimeViews are available on client only when you have RadTimePicker (Or just an TimeView) on the page. So the logic for hiding TimeViews on clicking RadDatePicker's button can no be embedded into the picker, because it will not work when there is no time view on the page.

    So in popup opening of the date picker you can use the flowing code to hide all time popups.
    for (var timePopupId in Telerik.Web.UI.RadDateTimePicker.TimePopupInstances)
    {
        if (Telerik.Web.UI.RadDateTimePicker.TimePopupInstances.hasOwnProperty(timePopupId))
        {
            Telerik.Web.UI.RadDateTimePicker.TimePopupInstances[timePopupId].Hide();
        }
    }
    And note that this code will work only when there is TimeView in your page, if not you will get an error that "Telerik.Web.UI.RadDateTimePicker" is undefined.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 22 Jan 2013 Link to this post

    [ First of all sorry for nacroposting but ] I am still able to re-produce this for the scenario below :

    1. Go to http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/custompopup/defaultcs.aspx
    2. click on the text-box
    3. punch in a date , any date like 01/01/2006 and hit tab
    4. the pop-up gets updated 
    5. tab-off again, and still there ...

    I am using asp:panel to dynamically populate telerik controls for my report parameters ( FYI - it is not a telerik report, un-fortunately) in my user control - .ascx.cs file.

    I tab-off, from the popup-control (per this terminology) and it still stays, and I can see the cursor " | " only, the next radTextbox seems to be behind the curtain of the popup-control.

    Kindly, suggest a work-around...

    Thanks,
    -Aarsh

  9. Aarsh
    Aarsh avatar
    192 posts
    Member since:
    Jun 2012

    Posted 22 Jan 2013 Link to this post

    for now,

    dtPicker.ShowPopupOnFocus = false;

    seems to be serving my purpose on the demo as well as my dynamically being crated control in asp:panel of my .net user control.

    Thanks,
    -Aarsh
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017