jquery ui 1.10.3 datepicker

jquery ui 1.10.3 datepicker

I am using jquery.ui.1.10.3 and I am using datepicker and if it's the first element in the popup the datepicker will automatically popup and when I select a date the datepicker keep showing instead of disappearing and I tried many things I found online and nothing works with me till this moment.

My problem is not with the auto poping up the problem that it's not disappearing as it should when I select a date.