I am using a Matrix-type question for respondents to indicate their upcoming weekly schedule (e.g., what time will you go to work on Monday?). Right now, I am using the 24-hour TimePicker code from Flatpicker (https://flatpickr.js.org/examples/#time-picker). My code works as intended except for one part: If participants are not working on a particular day of the upcoming week, we instruct them to leave the field blank. But with the code, if they click on that day, they aren't able to delete the time that appears in the box. Thus, they will HAVE to input an answer even if they didn't intend to.
Does anyone know of any revisions I could make to my code to either a) allow people to delete times from boxes after already clicking on them, or b) allow people to input a non-time answer to indicate that they do not work on a specific day? Thank you to any insights! I am new to using code in Qualtrics.
Here is my current code for the Matrix question:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("#"+this.questionId+" .InputText").flatpickr({
enableTime: true,
noCalendar: true,
defaultTime: "H:i"
});
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Question
Allowing respondents to "undo" entry on TimePicker in a Matrix-type question.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
