Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Prevent opening datepicker after switching tabs

weronka29b24da47495
diff --git a/saleor/static/js/dashboard.js b/saleor/static/js/dashboard.js
index 39a9d6d572..2e296325c9 100644
--- a/saleor/static/js/dashboard.js
+++ b/saleor/static/js/dashboard.js
@@ -171,7 +171,10 @@ $('.datepicker').pickadate({
format: 'd mmmm yyyy',
formatSubmit: 'yyyy-mm-dd',
selectMonths: true,
- hiddenName: true
+ hiddenName: true,
+ onClose: function() {
+ $(document.activeElement).blur();
+ }
})
function initSelects() {
$('select:not(.browser-default):not([multiple])').material_select()