Fixed issue with the hide event when dates are undefined.