Javascript - Time Picker | XM Community
Skip to main content
Solved

Javascript - Time Picker

  • September 13, 2018
  • 3 replies
  • 109 views

arushman
Forum|alt.badge.img+3
We have two questions where we have entered the following javascript. We want the respondent to be able to pick the opening time in question one and the closing time in question two.....however when the data is entered the opening time is recorded for both question 1 and question 2. thoughts? Javascript: Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ }); Qualtrics.SurveyEngine.addOnReady(function() { /*Place your JavaScript here to run when the page is fully displayed*/ var Qbd = "input[id='QR~"+this.questionId+"']"; jQuery("#" + this.questionId + " .InputText").hide(); jQuery("#appt-time").on(" change", function() { jQuery(Qbd).val(jQuery("#appt-time").val()) ; }); }); Qualtrics.SurveyEngine.addOnUnload(function() { /*Place your JavaScript here to run when the page is unloaded*/ });

Best answer by Sona

Hey @arushman , Is your question one and question two on separate pages, if not then please do and check. Hope this helps.

3 replies

Sona
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • Answer
  • September 13, 2018
Hey @arushman , Is your question one and question two on separate pages, if not then please do and check. Hope this helps.

arushman
Forum|alt.badge.img+3
  • Author
  • September 13, 2018
YES -- that is what it needed! THANK YOU!

Forum|alt.badge.img+2
is it possible to make it in 24 hr format?