From fc5b78ba0a63882ab48f03e4a3c77c55e2e7a9ca Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 27 Jan 2023 17:10:02 +0100 Subject: [PATCH] show 'set to today' button also on 'survey:date' field --- modules/ui/fields/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 48191822c..0ae46234c 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -285,7 +285,7 @@ export function uiFieldText(field, context) { const now = new Date(); const today = new Date(now.getTime() - now.getTimezoneOffset() * 60000).toISOString().split('T')[0]; - if (field.key === 'check_date' && date !== today) { + if ((field.key === 'check_date' || field.key === 'survey:date') && date !== today) { wrap.selectAll('.date-set-today') .data([0]) .enter()