diff --git a/desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako b/desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako index 178e59dbd96..4942f157132 100644 --- a/desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako +++ b/desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako @@ -170,9 +170,9 @@ else: $(document).on("click.hideDatepicker", function (event) { if (!$(event.target).closest(".datepicker, .calendar-link, input[type='text']").length) { _el.datepicker('hide'); + $(document).off("click.hideDatepicker"); } }); - $(document).off("click.hideDatepicker"); }); _el.datepicker('show');