Popup calendar now closes automatically after selecting a date