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

[Solved] Close raddatepicker

1 Answer 145 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 04 May 2009, 03:17 PM
Hi,
In the datepicker, I have added button in the footer template and when I click on it I want to populate the Todays date on the dateinput and close the datepicker.
Currently I have added OnClientClick event by which I m able to populate Todays date on the dateinput but I m unable to close it.Could any one please let me know how to do it?

Here is the code 
<asp:ImageButton ID="IBToday" runat="server" OnClientClick="SelectToday()" ImageUrl="~/Skins/Web20/Calendar/MonthYearTodayBtn.gif" />

  function SelectToday()
    {
      var currentDate = new Date()
      var picker = $find("<%= datepicker1.ClientID %>");
      picker.set_selectedDate(currentDate);                
    }


Thanks
Johnsvuk

1 Answer, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 04 May 2009, 03:46 PM
Hi,
 I found out the answer myself. I used hidePopup() to close the datepicker. The reason  I wasnot able to close before was I was using HidePopup().
Tags
Calendar
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Share this question
or