fix invalid test

An invalid date test fails since the beginning of 2013
fix #303 Infinite loop on datepicker