I have a calender control on my page. It is a popup control, meaning when I click on calender image then it opens up. But the problem is when I am changing the month, it becomes invisible due to stylesheet rule. which is following.
and the calender is following
Can I change style sheet rule dynamically in the page load postback event, so when the month changes I can make display:"block" instead of "none".
Code:
#datePicker
{
display:none;
position:absolute;
border:solid 2px black;
background-color:white;
}
Code:
<img src="Calendar.gif" onclick="displayCalendar()" />
<div id="datePicker">
<asp:Calendar
id="calEventDate"
OnSelectionChanged="calEventDate_SelectionChanged"
Runat="server" />
</div>
function displayCalendar()
{
var datePicker = document.getElementById('datePicker');
datePicker.style.display = 'block';
}
Comment