When using HTML5 allow empty dates to be properly displayed

Same as #2377 for for 3.0-unstable