goodk
asked on
how do we initialize the calendar control with certain date?
1- like If the user click the text boxt to change, after first time, I want the same month year appears.
2- I tried width and height but the calendar control did not went below 16px? How can I make the calendar picker very small with small fonts?
I am using asp.net
thanks
<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
<head>
<script language="C#" runat="server">
void Selection_Change(Object sender, EventArgs e)
{
Label1.Text = "The selected date is " + Calendar1.SelectedDate.ToS hortDateSt ring();
}
</script>
</head>
<body>
<form runat="server">
<h3>Calendar Example</h3>
Select a date on the Calendar control.<br><br>
<asp:Calendar ID="Calendar1" runat="server"
SelectionMode="Day"
ShowGridLines="True"
OnSelectionChanged="Select ion_Change ">
<SelectedDayStyle BackColor="Yellow"
ForeColor="Red">
</SelectedDayStyle>
</asp:Calendar>
<hr><br>
<asp:Label id="Label1" runat=server />
</form>
</body>
</html>
2- I tried width and height but the calendar control did not went below 16px? How can I make the calendar picker very small with small fonts?
I am using asp.net
thanks
<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
<head>
<script language="C#" runat="server">
void Selection_Change(Object sender, EventArgs e)
{
Label1.Text = "The selected date is " + Calendar1.SelectedDate.ToS
}
</script>
</head>
<body>
<form runat="server">
<h3>Calendar Example</h3>
Select a date on the Calendar control.<br><br>
<asp:Calendar ID="Calendar1" runat="server"
SelectionMode="Day"
ShowGridLines="True"
OnSelectionChanged="Select
<SelectedDayStyle BackColor="Yellow"
ForeColor="Red">
</SelectedDayStyle>
</asp:Calendar>
<hr><br>
<asp:Label id="Label1" runat=server />
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Label1.Text = "The selected date is " + Calendar1.SelectedDate.ToS hortDateSt ring();
just the reverse of the above. Like the calendar1.??=Label1.Text;
just the reverse of the above. Like the calendar1.??=Label1.Text;
ASKER
partial answer
ASKER