Add min/max validation for date, datetime, and number questions (#1858)

This commit is contained in:
Raphael Michel
2020-11-27 11:02:07 +01:00
committed by GitHub
parent 921b28f8d4
commit 66af5973ec
13 changed files with 262 additions and 13 deletions

View File

@@ -102,6 +102,10 @@ $(function () {
var show = $("#id_type").val() == "C" || $("#id_type").val() == "M";
$("#answer-options").toggle(show);
$("#valid-date").toggle($("#id_type").val() == "D");
$("#valid-datetime").toggle($("#id_type").val() == "W");
$("#valid-number").toggle($("#id_type").val() == "N");
show = $("#id_type").val() == "B" && $("#id_required").prop("checked");
$(".alert-required-boolean").toggle(show);
}