<asp:TextBox ID="txtDate" runat="server" ></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDate" Format="MM/dd/yyyy" OnClientShowing="showDate" > </cc1:CalendarExtender>
<script type="text/javascript" language="javascript">
function showDate(sender,args)
{
if(sender._textbox.get_element().value == "")
{
var todayDate = new Date();
sender._selectedDate = todayDate;
}
}
</script>
sindhoor wrote:
CalendarExtender.SelectedDate without populating text box
07-Oct-09
hope this works for you.
<asp:TextBox ID="txtDate" runat="server" ></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDate" Format="MM/dd/yyyy" OnClientShowing="showDate" > </cc1:CalendarExtender>
<script type="text/javascript" language="javascript">
function showDate(sender,args)
{
if(sender._textbox.get_element().value == "")
{
var todayDate = new Date();
sender._selectedDate = todayDate;
}
}
EggHeadCafe - Software Developer Portal of Choice
Extending a TextBox Control in ASP.NET
http://www.eggheadcafe.com/tutorial...9-d47cfb4b6482/extending-a-textbox-contr.aspx