0

Possible Duplicate:
How to change the pop-up position of the jQuery DatePicker control

How can i change the position of the UI datepicker widget??

I used the ui datepicker widget for my text box. But when i click on the calander. The datapicker is show. But the datepicker are stay on the wrong position. The datapicker must be on the left of the calander icon.

You can see it here live: You can see it here live

This is my javascript for the ui datapicker.

// Data picker
$(function () {
    $('#datepicker').datepicker({
        beforeShow: function(input, inst)
        {
            inst.dpDiv.css({marginTop: -input.offsetHeight + 'px', marginRight: input.offsetWidth + 'px'});
        }
    });
});
Community
  • 1
  • 1
Mike Vierwind
  • 1,482
  • 4
  • 23
  • 44

1 Answers1

0

You can add this css:

#ui-datepicker-div
{
    left:600px !important;
    width:470px !important;
}

You can play with the poisition by chancing the left & width in pixels. I found this with by debugging the html with Firebug for firefox.

Mathieu
  • 3,073
  • 1
  • 19
  • 25