Click here to Skip to main content
15,748,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys i'm facing a problem over here this is my actual code..

<asp:ImageButton ID="ibtn_To" runat="server" Style="vertical-align: middle; cursor: pointer;" ImageUrl="~/Images/Calendar_scheduleHS.png" Width="16px" Height="16px" meta:resourcekey="ibtn_ToResource1" />
<cc1:CalendarExtender ID="ce_ToDate"  runat="server" TargetControlID="txt_ToDate"
                                            Enabled="True" Format="dd-MMM-yyyy" PopupButtonID="ibtn_To" OnClientDateSelectionChanged="fun_chkDates">

i want my calendar to be popped-up just exact below the image button...
is there any way to set its position in this way....reply :-)
Updated 31-Jan-12 15:31pm
Sergey Alexandrovich Kryukov 31-Jan-12 13:09pm    
Pop-up on what event? Anyway, simply control its visibility.


I had similar problem and I solved it using java script.

Try this example...

Add js code ....
<script type="text/javascript" language="javascript">

        function onCalendarShown(sender, args) {

            // Get Image that was clicked to open calendar
            var calendarImage = $get('<%=imgCalendar.ClientID %>');

            // Set new calendar position
   = calendarImage.offsetTop + calendarImage.height + 'px';
   = calendarImage.offsetLeft + 'px';


and markup code...
<asp:scriptmanager id="ScriptManager1" runat="server">
    <asp:textbox id="txtDate" runat="server" />
    <asp:image id="imgCalendar" runat="server" imageurl="~/Images/calendar.png" />
    <cc1:calendarextender id="CalendarExtender1"  runat="server" targetcontrolid="txtDate"
        PopupButtonID="imgCalendar"  önClientShown="onCalendarShown" />

It must work, if you have any problem, just post here and I'll send you working example...
Share this answer
Elegantly Wasted 1-Feb-12 0:03am    
thanks buddy...:-)
Siva Krishna 18-Aug-12 6:03am    
please send working example
Martin Arapovic 21-Aug-12 8:50am    
Hi, You have all code posted here within answer. You only need to create empty aspx page, download/add ajaxcontroltoolkit as reference and paste markup code into page and javascript code in head of your aspx page. If you can't get it to work, contact me by email martinarapovic(at) and I'll sent you working example...
I was at the same problem , just wrapped my control in a DIV and set position to absolute for the container DIV

refer this url :
Share this answer
Simply put the following code into your page

.ajax__calendar {
position : absolute;
Share this answer
Member 14067958 6-Feb-19 9:34am    
This worked like a charm.
Guys use this code in your aspx

left: 277px !important;/* change as per requirement*/
left: 519px !important;

mention this in ajax CalendarExtender tag

CssClass="ajax__calendar fromDtPos" /* change as per requirement */
CssClass="ajax__calendar toDtPos"

This has definately solved my problem...
Yo...! :p
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900