Outside click closes the datepicker in this example

Outside click doesn't close the datepicker in this example