Opened 8 years ago

Closed 8 years ago

#8015 closed bug (notabug)

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.

Change History (2)

comment:1 Changed 8 years ago by phill.l

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>

comment:2 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.