Date bug fixed for IE

This fixes the IE error with date.