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

Javascript showPopup() only flashes visible

1 Answer 295 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Holly
Top achievements
Rank 1
Holly asked on 02 Jul 2009, 02:18 PM
Hi,
I have a asp:button that calls the shopPopup() method of the datetimepicker as below.
Although this visibly works, the popup is only momentarily displayed before becoming hidden. This is so fast that it looks like a flicker.  I presume this is something to do with the postback from the page when the button is pressed resetting the datetimepicker but I am unsure of how to fix it.
If anyone can help it would be very welcome.

<script type="text/javascript">    
function ShowPopup()    
{  
    var datetimepicker = $find("<%= txtcalMeetingDate.ClientID %>");    
    datetimepicker.showPopup();  // Show Calendar popup       
}    
</script>   

 

<asp:button runat = "server" name= "View Calendar" id = "CalendarPopup1" visible = "false" />

and in code-behind:

 

CalendarPopup1.Attributes.Add(

"onClick", "ShowPopup();");

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 02 Jul 2009, 04:10 PM
Hello Holly,

I recommend you try the following modification:

C#
CalendarPopup1.Attributes.Add("onClick""ShowPopup(); return false;"); 

Regards,
Daniel
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.
Tags
Calendar
Asked by
Holly
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or