CalendarExtender.SelectedDate without populating text box

M

mohaaron

Does anyone know how to select the current date without the associated
text box being populated with the date?
 
Joined
Oct 7, 2009
Messages
1
Reaction score
0
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;
}
}

</script>
 
S

sindhoor

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
 
S

sindhoor

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

sindhoor

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top