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?

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?
Try the following code below:
Qualtrics.SurveyEngine.addOnload(function() {
var dateInput = jQuery("#" + this.getQuestionContainer().id + " inpututype='text']");
dateInput.on("change", function() {
jQuery(".ui-datepicker").hide();
});
dateInput.on("click", function() {
if (dateInput.val().trim() !== "") {
jQuery(".ui-datepicker").hide();
}
});
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.