CalendarExtender.SelectedDate without populating text box

  • Thread starter Thread starter mohaaron
  • Start date Start date
M

mohaaron

Does anyone know how to select the current date without the associated
text box being populated with the date?
 
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;
}
}




mohaaro wrote:

CalendarExtender.SelectedDate without populating text box
15-Dec-07

Does anyone know how to select the current date without the associated
text box being populated with the date?

EggHeadCafe - Software Developer Portal of Choice
C# Mutipart MIME Encoding Library using CDO
http://www.eggheadcafe.com/tutorial...c0-6623da269eb5/c-mutipart-mime-encoding.aspx
 
<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
 
call javascript function "showdate" from

CalendarExtender OnClientShowing="showDate"

<script>
function showDate(sender,args)
{
if(sender._textbox.get_element().value == "")
{
var todayDate = new Date();
sender._selectedDate = todayDate;
}
}
</script>



sindhoor wrote:

sorry I had missed few parts of the code in my previous post
07-Oct-09

<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>

EggHeadCafe - Software Developer Portal of Choice
HTML Horizontal Bar Chart
http://www.eggheadcafe.com/tutorial...6-3370bea2c012/html-horizontal-bar-chart.aspx
 
Back
Top