How do I ... Make the Calendar pop up over other controls

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

Hello,
I would like for my users to have a calendar control
only when needed. IE button click for the control to
appear and then once the date is selected. Populate a text
box and the calendar control then is invisible.
How do I make the calendar control pop up over other
control in a asp.net c# environment?

Charles
 
Hi Charles,

You can use client script to set the calendar's left and top to the same as
the button.
When loading page, the calendar is invisable, in the button's click event,
you can
set the button to invisable and the calendar to visable.
In calendar's SelectionChanged event, you set the calendar invisable again
and button visable.
The selected result display in the text box.

But I think it is a better way of place the calendar into a individual
<div> tag and show it and set its
position in the button's click event.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Charles" <[email protected]>
| Sender: "Charles" <[email protected]>
| Subject: How do I ... Make the Calendar pop up over other controls
| Date: Mon, 29 Sep 2003 21:08:49 -0700
| Lines: 10
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOHCIzsNOywYW3JTBicMm8x7lCcBw==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188112
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello,
| I would like for my users to have a calendar control
| only when needed. IE button click for the control to
| appear and then once the date is selected. Populate a text
| box and the calendar control then is invisible.
| How do I make the calendar control pop up over other
| control in a asp.net c# environment?
|
| Charles
|
|
 
Hello,

Thanks for responding, could you be more specific? I have to see the
code, concepts don't work for me.
Also, the results textbox needs to be an asp:TextBox runat server.

Charles
 
Hi Charles,

You can include your calendar inside a <div> tag and set the visibility
style of it hidden, then on the click of the button you will change the
visibility to visible.
now you will have to play a little with the interaction between server side
code and client side code to do this. It's not difficult though. basically
what you need is set the onclick action of the button toa function that
change the visibility of the div , if you use only one calendar by page then
this div can have a predefined ID so the javascript function may look like:

function ChangeVisibility( show )
{
if ( show )
document.all[ "Div Name"].style.visibility = visible;
else
document.all[ "Div Name"].style.visibility = hidden;
}

and you will need two more functions:
one for the button click to show the calendar:
function ShowCalendar()
{
//set back the date from the textbox to the calendar
...
//show the calendar
ChangeVisibility(true);
}

and another for get back the value and hide it:
function HideCalendar()
{
//get the value fmro the calendar and put it back in the input box
...

ChangeVisibility(false);
}

This is basically it, of course you still need to fill the ... sections but
that is where the fun is :)


Hope this help,
 
Hi Charles,

I think what Ignacio said is clear to implement your logic.
But I think you also should set the div's postion properly in script code,
such as: you may need the div to follow the move of your mouse, you can get
this down by handle the onmousemove event. There are many script samples on
the internet, you can search easily.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: Charles Wildner <[email protected]>
| References: <[email protected]>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: How do I ... Make the Calendar pop up over other controls
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <#wHT#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Date: Tue, 30 Sep 2003 04:41:08 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188176
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello,
|
| Thanks for responding, could you be more specific? I have to see the
| code, concepts don't work for me.
| Also, the results textbox needs to be an asp:TextBox runat server.
|
| Charles
|
|
|
|
|
| Don't just participate in USENET...get rewarded for it!
|
 
Hi Charles,

Is your problem resovled?

If you still have any unclear, please feel free to let me know.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| X-Tomcat-ID: 95425438
| References: <[email protected]>
<#wHT#[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Thu, 02 Oct 2003 03:57:39 GMT
| Subject: RE: How do I ... Make the Calendar pop up over other controls
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Lines: 43
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188483
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
|
| Hi Charles,
|
| I think what Ignacio said is clear to implement your logic.
| But I think you also should set the div's postion properly in script code,
| such as: you may need the div to follow the move of your mouse, you can
get
| this down by handle the onmousemove event. There are many script samples
on
| the internet, you can search easily.
|
| Hope this helps,
| Best regards,
| Jeffrey Tan
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights.
|
| --------------------
| | From: Charles Wildner <[email protected]>
| | References: <[email protected]>
| | X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| | Subject: RE: How do I ... Make the Calendar pop up over other controls
| | Mime-Version: 1.0
| | Content-Type: text/plain; charset="us-ascii"
| | Content-Transfer-Encoding: 7bit
| | Message-ID: <#wHT#[email protected]>
| | Newsgroups: microsoft.public.dotnet.languages.csharp
| | Date: Tue, 30 Sep 2003 04:41:08 -0700
| | NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| | Lines: 1
| | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:188176
| | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| |
| | Hello,
| |
| | Thanks for responding, could you be more specific? I have to see the
| | code, concepts don't work for me.
| | Also, the results textbox needs to be an asp:TextBox runat server.
| |
| | Charles
| |
| |
| |
| |
| |
| | Don't just participate in USENET...get rewarded for it!
| |
|
|
 
Back
Top