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

TimeView Control

2 Answers 139 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Shaun Peet
Top achievements
Rank 2
Shaun Peet asked on 11 Oct 2007, 04:52 PM
Is there any way to get the TimeView control to always occupy space on the page, without requiring that it "pop-up"?  This is a usability thing as it requires two clicks to set the time when the "pop-up" is used and would only require one click if the TimeView was always visible.  If there's real estate available on the form then it would be nice to have that option.  I've created a series of div's that use an onclick javascript function to do the same, but it's nearly impossible to "link" the current time with my custom TimeView (so that it highlights the current one).

2 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 12 Oct 2007, 11:32 AM
Hello Shaun Peet,

You can achieve the desired functionality like this:

<script type="text/javascript"
function pageLoad() 
       
    window.setTimeout(function() 
                      { 
                        // override the default logic in order not to close the timeview  
                        // when clicking outside the timepicker 
                        Telerik.Web.UI.Calendar.Popup.prototype.ShouldHide = function(){return false;}; 
                         
                        // open the timeview on load 
                        $find("RadTimePicker1").ShowTimePopup(); 
                      }, 0); 
 
// cancel closing on time selection through the timeview 
function OnPopupClosing(sender, args) 
    args.set_cancel(true); 
</script> 
 
<telerik:RadTimePicker ID="RadTimePicker1" runat="server"
    <ClientEvents OnPopupClosing="OnPopupClosing" /> 
</telerik:RadTimePicker> 



All the best,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shaun Peet
Top achievements
Rank 2
answered on 15 Oct 2007, 12:30 AM
Thanks Manuel.
Tags
Calendar
Asked by
Shaun Peet
Top achievements
Rank 2
Answers by
Giuseppe
Telerik team
Shaun Peet
Top achievements
Rank 2
Share this question
or