Updated require fields logic

This commit is contained in:
gaazzopa 2020-11-17 15:43:57 +01:00
parent 728813fdd3
commit 40ee0a87c9

View file

@ -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));