I've been attempting to conceal the next button on a Qualtrics survey until a specific day and time (stored as 'threshold' in my code). I've experimented with
Qualtrics.SurveyEngine.addOnload(function()
{
var threshold = '2020-02-07T20:00:00.000Z';
var today = new Date();
if(threshold < today) $('NextButton').hide();
else $('NextButton').show();
});
along with
Qualtrics.SurveyEngine.addOnload(function() {
function hideEl(element) {
element.hide();
}
var nb = $('NextButton');
var threshold = '2020-02-07 08:12';
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
var time = today.getHours() + ":" + today.getMinutes();
var dateTime = date+' '+time;
hideEl.defer(nb);
if(var dateTime < threshold ) nb.hide();
else nb.show();
});
and
Qualtrics.SurveyEngine.addOnload(function() {
function hideEl(element) {
element.hide();
}
var threshold = '2020-02-07T20:00:00.000Z';
var today = new Date();
var nb = $('NextButton');
hideEl.defer(nb);
$(this.questionId).on('display', function(event) {
if(today<threshold) nb.hide();
else nb.show();
});
});
Unfortunately, none of these attempts have successfully achieved the desired result. Any suggestions?
Thank you!!