This is a migrated thread and some comments may be shown as answers.

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

8 Answers 349 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
heyrohit
Top achievements
Rank 1
heyrohit asked on 30 May 2012, 10:58 AM
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

8 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 May 2012, 12:20 PM
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.
0
heyrohit
Top achievements
Rank 1
answered on 30 May 2012, 12:27 PM
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
0
Vasil
Telerik team
answered on 31 May 2012, 07:40 AM
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.
0
heyrohit
Top achievements
Rank 1
answered on 31 May 2012, 10:42 AM
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
0
Vasil
Telerik team
answered on 04 Jun 2012, 08:16 AM
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.
0
Aarsh
Top achievements
Rank 1
answered on 22 Jan 2013, 04:10 PM
[ 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

0
Aarsh
Top achievements
Rank 1
answered on 22 Jan 2013, 04:17 PM
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
0
German
Top achievements
Rank 1
answered on 11 May 2018, 06:19 PM

Hi Vasil, I have a different issues for RadDatePicker calendar control. I am trying to make the calendar popup control to be keyboard accessible by adding attributes: EnableKeyboardNavigation="true". Tabbing to the calendar and hitting spacebar or Enter key open up the calendar popup. This works well in navigating inside the popup calendar but if you don't change the existing date in the popup calendar and you hit spacebar or Enter key, the popup doesn't close or no window event was happening. It will close only if you change the date. I want the popup calendar to close even without updating the existing date.

Please help...I can't find a solutions from the internet....thanks.

 

 

 

 

 

Tags
General Discussions
Asked by
heyrohit
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
heyrohit
Top achievements
Rank 1
Vasil
Telerik team
Aarsh
Top achievements
Rank 1
German
Top achievements
Rank 1
Share this question
or