From e47fa263de80cbff1590d7c462e42fac1e75d1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauro=20Ferr=C3=A3o?= Date: Fri, 18 Oct 2024 11:01:51 +0100 Subject: [PATCH] Schedule Filter: Cannot clear dates when selecting a range (#2770) relates to xibosignage/xibo#3519 --- ui/src/core/xibo-calendar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/core/xibo-calendar.js b/ui/src/core/xibo-calendar.js index 68cd419d66..5b5d3b111e 100644 --- a/ui/src/core/xibo-calendar.js +++ b/ui/src/core/xibo-calendar.js @@ -204,7 +204,10 @@ $(document).ready(function() { if(calendar != undefined) { let selectedDate = moment(moment($('#fromDt').val()).format(systemDateFormat)); // Add event to the picker to update the calendar - calendar.navigate('date', selectedDate); + // only if the selected date is valid + if (selectedDate.isValid()) { + calendar.navigate('date', selectedDate); + } } };