John
Posted
on May 5, 2009
(permalink)
Hi,
I have added button to the footer of the datepicker. When i click on it it calls the "onclientclick" event which populate the today date on the dateinput space and close the datepicker. The issue is,after the after the datepicker is closed there is a automatic postback. I tried to do partialpostback with update panel which did not work too.Please let me know how I can solve the issue and not have automatic postback.
<FooterTemplate>
<asp:ImageButton ID="IBToday" runat="server" OnClientClick="SelectToday()" ImageUrl="~/Skins/Web20/Calendar/MonthYearTodayBtn.gif" />
</FooterTemplate>
function SelectToday()
{
var currentDate = new Date()
var picker = $find("<%= datepicker1.ClientID %>");
picker.set_selectedDate(currentDate);
picker.hidePopup();
}
Reply
Posted
on May 6, 2009
(permalink)
Hi John,
Add return false; in OnClientClick of ImageButton in order to avoid the postback.
ASPX:
Thanks,
Princy.
Reply