My project has a datepicker which has buttons to go previous/next months.
it looks like this:

but when i click the buttons on right and left corner of the control, it suddenly disappears.
jquery function:
 $( "#departDate" ).datepicker({
        showOtherMonths: true,
        //inline:true,
        dateFormat: 'dd-mm-yy',
        numberOfMonths: 2,
        selectOtherMonths: true,
        minDate: 0,
        onClose: function (selectedDate) {
            $("#arriveDate").datepicker("option", "minDate", selectedDate);
            if (!single && $("#arriveDate").val()=="")
                $("#arriveDate").focus();
        }
    });
i tried to comment out onClose: and minDate but none of these fixed problem.
When i remove blur function on this datepicker, it stops disappearing. But i need to make it disappear when click anywhere out of this tool.
 
     
     
     
    