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

ToggleDate()

1 Answer 42 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Michael Tissington
Top achievements
Rank 1
Michael Tissington asked on 23 Nov 2007, 06:24 PM
I'm trying to  create a generic ToggleDate function but I'm a little confused about how to pass in the ClientID of the control to popup

<DateInput onclick="ToggleDate(??)" />

How do I pass the ?? as a parameter?

1 Answer, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 26 Nov 2007, 12:13 PM
Hello Michael Tissington,

You can use the following code:

function ToggleDate (dateInputId) 
    { 
        var dateInput = window[dateInputId]; 
    } 

And in the code-behind:

public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
        DateInputLive.DateInput.Attributes.Add("onclick", "ToggleDate('" + DateInputLive.ClientID + "');");  
    } 

I hope this helps, and let me know if you have further questions.

Greetings,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Calendar
Asked by
Michael Tissington
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Share this question
or