Đoạn script sau dùng để định vị vị trí hiển thị:
<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
sender._popupDiv.parentElement.style.top = calendarImage.offsetTop + calendarImage.height + 'px';
sender._popupDiv.parentElement.style.left = calendarImage.offsetLeft + 'px';
}
</script>
<asp:scriptmanager id="ScriptManager1" runat="server">
</asp:scriptmanager>
<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" />
</cc1:calendarextender>