Bug in survey visualization | XM Community
Skip to main content
Hi, I am currently attempting to build up a time-use diary survey. Thus, among the others, I ask the respondent "what were you doing at this hour" and then "untill which time did you perform this activity?" many times in the survey (untill they reach the end of the day). I built-up a timepicker (thanks to this community essentially! it was of great help) by typing the following in the header of the time-piker question:



!



and then I also wrote this in the Javascript space:



Qualtrics.SurveyEngine.addOnload(function()

{

const fp = jQuery("#"+this.questionId+" .InputText").flatpickr({enableTime: true, noCalendar: true, dateFormat: "H:i", minuteIncrement: 10, time_24hr: true, onChange: function(){

var originalMinutes = fp.selectedDates[0].getMinutes();

var minutesByTen = Math.round(fp.selectedDates[0].getMinutes()/10);

if (minutesByTen > 60)

minutesByTen = 60;

var date = fp.selectedDates[0];

date.setMinutes(minutesByTen*10);

fp.setDate(date, false, null);

if (originalMinutes !== minutesByTen*10)

alert("Solo intervalli di 10 minuti");

}});

});



and I have this perfect timepicker exactely as I wanted.

My problem now is quite a strange one: when I preview the survey (and the same holds true if someone elso from another pc tries to take the survey exactely as it happens to my previwing it) it is like the answer one gives to the timepicker "stays" on the desktop when I pass to the other questions of the block, I mean that I still see a part of my answer to the flatpicker question (in a strange format) over the space where I should only see the following questions and answers. I attach here some photos to let you grab an idea of this creepy situation:



!

here is immediately after the first answer to the timepicker has been given.



!

here is another time the question following the timepicker one



!



here another example,there have been already 5 answers to 5 different flatpickers and they all seem to "persist" on the screen:





I do not have any clue, does someone have? how can I remove those squares??? tnx a lot in advance!!
Hi @C882! It looks like you will have to explore adding CSS to your question. If you do not know how to code - no worries! We recommend checking out W3Schools and our pages on Adding Custom CSS and Adding JavaScript to get a basic understanding!
Hi,

I have got the same problem with flatpicker in my survey. The answers just sit there on the screen. Did you figure out how to get rid of it?

Leave a Reply