<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var date_now = new Date();
var sub_date = new Date("2017-1-15");
if (date_now < sub_date) {
$('#movesubmitbtn').click(function(e) {
e.preventDefault();
alert("You cannot submit this survey until" + sub_date);
return false;
});
}
});
</script>
Hehe, I fucked up in Date("x-x-x") in first script, apparently "2017-1-15" is not a valid date (doh). Anyhow, this is working fine on iphone 6+7:
Code:
This is an array with condition on first sub-question in survey2. <script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var date_now = new Date();
var sub_date = new Date("2017-01-11");
if (date_now < sub_date) {
$('#movesubmitbtn').on('click touch', function() {
$(this).prop('disabled', true);
alert("You cannot submit this survey until" + sub_date);
});
}
});
</script>