简体   繁体   中英

asp calendar : blocking off when navigating previous/ next month

i'm using asp calendar in my webpage, when i was clicking the previous month arrow its just showing that month and popping off. but if its month navigation it should display as per my requirement ? and its selection date it should pop off.

Below is my code :

<asp:Image ID="Image1" runat="server" Height="20px" ImageUrl="~/Images/calendar.GIF" Width="20px"    onclick="displayCalendar()"  />
<div id="datePicker"><asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" ></asp:Calendar></div>

function displayCalendar() {
    var datePicker = document.getElementById('datePicker');
    datePicker.style.display = 'block';
}

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        StartDate.Text = Calendar1.SelectedDate.ToString("d");
    }

anyone's help will be appreciated .

thanks

Got my solution for this question.

OnsivibleMonthChanged="<function()>"

calendar control.

and defining the function to display the calendar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM