Я пытаюсь скрыть следующую кнопку в опросе Qualtrics до указанного c дня / времени (пороговое значение var в моем коде). Я пробовал
Qualtrics.SurveyEngine.addOnload(function()
{
var threshold = '2020-02-07T20:00:00.000Z';
var today = new Date();
if(threshold < today) $('NextButton').hide();
else $('NextButton').show();
});
и
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();
});
и
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();
});
});
, но не смог заставить его работать. Есть идеи?
Спасибо !!