Issue with datepicker in RTL html while running in IE compatibility mode

Issue with datepicker in RTL html while running in IE compatibility mode

If i run the datepicker in RTL html in IE 7 or 6 it dont pop up the 1st time i focus on the text input bound to the datepicker.
I was not able to understand what exacly is breaking it.
 
sample html:
<
html xmlns ="http://www.w3.org/1999/xhtml" dir ="rtl">

<

body>

<

p>Date: <input type="text" id="datepicker"></p>

<script type="text/javascript">

$(

function () {

$(

"#datepicker").datepicker();

});

</script>

</

body>

</

html>