here is my setup
$('.filterdate').datepicker({ format: 'MM/dd/yyyy', placeholder :textdate, });
$('.opendate').click(function(){ $('.filterdate').datepicker('show'); })
when click button to open datepicker, it close immediately
please view image for more detail https://i.imgur.com/88KUIV7.gifv