Calender hide | XM Community
Skip to main content
Question

Calender hide

  • January 28, 2025
  • 1 reply
  • 34 views

Forum|alt.badge.img+1

I selected a date question from Qualtrics Library. Even after selecting or typing the date, the calendar still appears. How can we remove it if a date has been entered or selected by the user?

 

 

 

1 reply

gPandey_715
Level 2 ●●
Forum|alt.badge.img+5
  • Level 2 ●●
  • 27 replies
  • February 5, 2025

Try the following code below:

Qualtrics.SurveyEngine.addOnload(function() {
    var dateInput = jQuery("#" + this.getQuestionContainer().id + " input[type='text']");
    
    dateInput.on("change", function() {
        jQuery(".ui-datepicker").hide(); 
    });

    dateInput.on("click", function() {
        if (dateInput.val().trim() !== "") {
            jQuery(".ui-datepicker").hide();
        }
    });
});


Leave a Reply