diff --git a/lib/editor/util/timetable.js b/lib/editor/util/timetable.js index 9d6a15306..1d17ad97d 100644 --- a/lib/editor/util/timetable.js +++ b/lib/editor/util/timetable.js @@ -48,18 +48,14 @@ let alertTimeout export function parseCellValue (timeString: string, col: TimetableColumn) { const date = moment().startOf('day').format('YYYY-MM-DD') const parsedDate = moment(date + 'T' + timeString, TIMETABLE_FORMATS, true) - clearTimeout(alertTimeout) - if (isTimeFormat(col.type)) { if (!parsedDate.isValid()) { - alertTimeout = setTimeout(() => alert('Please enter a valid time format'), 500) + alertTimeout = setTimeout(() => alert('Please enter a valid time format'), 600) return null } - return moment(date + 'T' + timeString, TIMETABLE_FORMATS).diff(date, 'seconds') } - return timeString }