From f0516c5d3061b9c9a5cefdd5c08fbdef6bb88260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adriana=20Ceri=C4=87?= <62163307+AdrianaCeric@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:12:02 -0400 Subject: [PATCH] fix(timetable): make alert timeout longer --- lib/editor/util/timetable.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 }