summaryrefslogtreecommitdiff
path: root/utils/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--utils/src/main.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/src/main.rs b/utils/src/main.rs
index 4428ac3..cafb4f9 100644
--- a/utils/src/main.rs
+++ b/utils/src/main.rs
@@ -34,12 +34,13 @@ struct Question {
space: AnswerSpace,
}
-#[derive(Deserialize, Serialize, StaticType, Debug)]
+#[derive(Deserialize, Serialize, StaticType, Debug, PartialEq)]
enum AnswerSpace {
Single(Vec<String>),
Multiple(Vec<String>),
YesOrNo,
Freeform(String),
+ Date,
}
#[derive(StructOpt, Debug)]
@@ -79,6 +80,11 @@ fn main () {
std::process::exit(1);
},
Ok(data) => {
+ if data.questions.iter().any(|q| q.space == AnswerSpace::Date) {
+ eprintln!(">> Warning: html input type date is not supported by Safari and Internet Explorer.\n See https://caniuse.com/input-datetime for details.");
+ }
+
+
let json = json::to_string(&data).unwrap();
// if a public key is given to encrypt the survey, ad-hoc typecheck it