Skip to main content

Search and Top Navigation

#8015 closed bug (notabug)

Opened January 15, 2012 11:38PM UTC

Closed January 16, 2012 01:09PM UTC

Date picker alignment problem for certain body style settings

Reported by: phill.l Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.17
Keywords: Cc:
Blocked by: Blocking:
Description

The date picker alignment is way off when the following styles are used on the body element:

max-width: 300px; margin: 0 auto; position: relative;

It's possible to work around the issue by wrapping the entire content in a div and applying the styles to the div instead of the body element.

Attachments (0)
Change History (2)

Changed January 15, 2012 11:43PM UTC by phill.l comment:1

Here's sample HTML, add the JQuery references to the head.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<script type="text/javascript">
		$(function(){
			$("[name='DemoTextBox']").datepicker();
		});
	</script>
<title>
	JQuery Test
</title></head>
<body style="max-width: 300px; margin: 0 auto; position: relative">
	<form action="None" method="post">
		<input type="text" name="DemoTextBox" value="" />
	</form>
</body>
</html>

Changed January 16, 2012 01:09PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

jQuery and jQuery UI don't support relatively positioned bodies.