diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index c842c8d2..6b5fa2c3 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -123,6 +123,8 @@ function require_air_supply(option) { function require_single_event(option) { $("#single_event_date").prop('required', option); + if (!option) + removeInvalidDate(); } function require_recurrent_event(option) { @@ -309,8 +311,6 @@ $(document).ready(function () { $(".finish_time").change(function() {validateFinishTime(this)}); $(".start_time").change(validateStartTime); - $("#event_type_recurrent").change(removeInvalidDate); - var radioValue = $("input[name='event_type']:checked"); if (radioValue.val()) { require_fields(radioValue.get(0));