using calender control in a table?

E

Elhanan Maayan

hi all...

i'm trying to use a calender control inside a table, since i don't
want to display the entire calender at once, i downloaded a control
from:
http://www.codeproject.com/aspnet/DateTimePicker.asp
which use a text and a button to display it.

problem is if i try to use inside a table, the caldner extends the
cell, and messes the table,i understood it somehow uses iframe to hide
and show it.

is there any way to make the calender "hover" aboee table table?

alternetly if i have no choice i can open a new window which will only
house the calender, but i need a way for that whe window to open as
close as possible the the button that clicked it

is there a way to know the position of mouse when i clicked on the
button? (like in vb onmouse events).
 
D

Daniel A. P. Jorge

Hi there Elhanan,

The way I'd choose to do it would be to input a DIV in my page and put
my calenadr object inside of it.

<div id="DivCalendar" style="LEFT: 200px;
POSITION:absolute;TOP:150px;visibility:hidden">
<asp:calendar ID="MyCalendar" Runat="server" />
</div>

<input type="button" ID="btnViewCalendar" Value="View Calendar"
onclick="window.DivCalendar.style.visibility = 'visible'">

This is the easiest way. There are ways to make it work under a
ServerControl [like asp:button] event, using Attributes collection.
Something like
MyCalendar.Attributes.Remove("VISIBILITY")
MyCalendar.Attributes.Add("VISIBILITY", "hidden");
// or
MyCalendar.Attributes.Remove("VISIBILITY");
MyCalendar.Attributes.Add("VISIBILITY", "visible");


Hope I could be of any help :D
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top