From: Joe Hunt Date: Sat, 5 Jan 2019 09:42:24 +0000 (+0100) Subject: Date Picker close when clicked outside of the datepicker. @kvvaradha and @apmuthu. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=36813770129eae719452f8d02144be61bbcd1d48 Date Picker close when clicked outside of the datepicker. @kvvaradha and @apmuthu. --- diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 642b9943..979f6587 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -1455,6 +1455,14 @@ function changeCCYear(change) { function changeCCMonth(change) { cC.changeMonth(change); } +window.addEventListener('click', function(e) { + if (document.getElementById('CC').contains(e.target)){} else { + if (cC.visible()) { + cC.hide(); + } + } +}); + document.write(\"\"); document.write(\"
\");";