edit-timetable.js: fix clearPeriod()