Generalise StatisticsAnnouncementDateForm JS

This allows it to be re-used on the new announcement form as well as
the date change form.