467,915 Members | 1,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Pop Up Calendar Control.

hey this is pavanik,

i had created a pop up calendar control.it is working properly.
but the problem is while i click on the button the calendar is displaying but if iam not selecting any date in the calendar(when i click on the page),that calendar must be invisible,but it is visible .

I had taken a textbox,button,calendar control.
when i click on that button the calendar must be displayed.that was my design.
while selecting the date it is displaying the date in text box which i have taken.

issue is: clicking on button calendar is displaying,but iam not selecting any date in that calendar,at the same time when i click on the page the calendar must be invisible.but it is visible .

i am not getting any idea.please help me out.
if any body want to send the answer send em to my email address:<email address removed>.
thanks in advance.
pavanik.
Aug 7 '07 #1
  • viewed: 1328
Share:
3 Replies
jhardman
Expert 2GB
pavanik,

how about [html]<body onClick="document.all.form3.calendarControl.style. visibility='hidden'">[/html]Jared
Aug 7 '07 #2
pavanik,

how about [html]<body onClick="document.all.form3.calendarControl.style. visibility='hidden'">[/html]Jared

hey

calendar.aspx.cs: server side

public partial class calendar : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();
}

protected void Button1_ServerClick(object sender, EventArgs e)
{
Calendar1.Visible = true;
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
TextBox1.Text = Calendar1.SelectedDate.ToShortDateString();
Calendar1.Visible = false;
}
}
this is my server side code,in client side just i have taken a button,text box,calendar control.

calendar.aspx: client side

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input type="button" id="Button1" runat="server" value="..." onserverclick="Button1_ServerClick" /><br />
<asp:Panel ID="pnlCalendar" runat="server" Style="position: absolute">
<asp:Calendar ID="Calendar1" runat="server" CellPadding="0" Font-Names="Verdana"
Font-Size="8pt" Height="160px" DayNameFormat="FirstLetter" Width="160px" ShowGridLines="True" OnSelectionChanged="Calendar1_SelectionChanged" SelectedDate="2007-08-07" Visible="False" VisibleDate="2007-08-08">
<NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
<DayHeaderStyle Font-Size="7pt" Font-Bold="True"></DayHeaderStyle>
<SelectedDayStyle Font-Bold="True"></SelectedDayStyle>
<TitleStyle Font-Bold="True"></TitleStyle>
</asp:Calendar>
</asp:Panel>
</div>
</form>
</body>
</html>

so now the calendar control is visible in design part.i want some thing different that calendar cntrl must not be in design but when i run it and when i click the button it should display the calendar.by doing like this the remaining controls will not be disturbed.
i think u can understand my issue.
thanks 4 reply,
pavani.k.
Aug 8 '07 #3
jhardman
Expert 2GB
moved to .NET forum. This is not an ASP issue.
Aug 8 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Tim Graichen | last post: by
5 posts views Thread by Miguel Dias Moura | last post: by
1 post views Thread by bill yeager | last post: by
reply views Thread by maxrawson | last post: by
2 posts views Thread by Caesar Augustus | last post: by
3 posts views Thread by Peter | last post: by
3 posts views Thread by =?Utf-8?B?UGFycm90?= | last post: by
7 posts views Thread by John Kotuby | last post: by
6 posts views Thread by thorpk | last post: by
3 posts views Thread by thorpk | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.