Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
694 views
in Technique[技术] by (71.8m points)

asp.net - CalendarExtender wrongly positioned after scrolling

I am adding a CalendarExtender to a page, using the default styles. When I click the calendar button to trigger the calendar popup, the calendar displays normally. However, when I scroll down and click the button again, the calendar's position is not where it should be, as seen below.

alt text

Why is this occuring and how do I fix it?

EDIT: A bit about the implementation of this page.

The CalendarExtender and TextBox are part of a WebPart added to a SharePoint 2007 Page. I am creating the extender like so:

textBox = new TextBox() { ID = "textBox" };
Controls.Add(textBox);

calendar = new CalendarExtender()
    {
        ID = "ceStartDate",
        TargetControlID = textBox.ID,
        PopupPosition = CalendarPosition.Right,
        PopupButtonID = image.ID
    };
Controls.Add(calendar);
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I came across the same problem today.

Wrap your textbox and calendarExtender in a div with position:relative;

That fixed the problem i was facing, i hope it does the trick for you too


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...