Fixed datepicker not closing issue