Non-popup calendar control?

R

rockdale

Hi,

I tried to search web for an non-popup calendar control, (like
javascript calendar) but could not find a good solution. Most solutions
are popup another window and show the calendar, then close and assign
the date back to the main window when user selected a date. Also find
some examples using div show/hide but could not maintain its state when
user navigate to next month.

Does anyone have a hyperlink to a good example? Does Microsoft aware
this and did any updated in .net 2.0?

Thanks
-rockdale
 
N

Neutrino

Personally for my projects I created a User Control that incorporates a
textbox, an icon and the asp.net 2.0 calendar control. I use ATLAS
UpdatePanel and CSS absolute positioning to bring the calendar to life
within the form (without Windows PopUps).

PanelFrame.Attributes.Add("style", "POSITION: absolute;vertical-align:
top; padding-right: 3px; padding-left: 3px; padding-bottom: 3px;
padding-top: 3px;");

I use the User Control and create a Value property and Changed event to
my control (using C#). I subscribe the main page to the User Control
event during the Page_Load event. The event calls my main page when the
date changes. The properties are the value of the date selected.

The truth is there is a big amount of methods and no specific one seems
to be particularily enforced in the community. So you will have to
search for and experiment until you find what is best in your scenario.


Good luck!

David - Neutrino
 
R

rockdale

Thanks those links. I will look at them...

I am actually tried to work

<script type="text/javascript">
function OnCalendarClick()
{

var obj = document.getElementById('divCal');
if(obj.style.display = "none")
obj.style.display = "";
else
obj.style.display = "none";
}
</script>


<div id="divCal" style="display:none">
<asp:Calendar ID="cal" runat="server"></asp:Calendar>
</div>


but the div just flash for a second and then dispeared.

thanks
-rockdale
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top