Adding Timepicker to allow only specific times on survey | XM Community
Skip to main content

Hi there,

I would like to know about how to set specific dates and times as options through JavaScript. While I’ve come across many articles explaining how to set up time, I haven’t found any that mentioned how to set specific dates and times “within the same question”.

I’m curious if this is feasible and how it can be accomplished. Below is the code I’ve written so far, and currently, it allows setting dates, but I’m having trouble specifying the time:

 

 

I’ve reviewed some articles which indicates how to set up time picker, but it’s not in the same question with specific dates, and most important, we could not assign specific times through it.

 

Any help or step-by step go through would be much appreciated, thanks in advance!

You may want to use the flatpickr MinMaxTimePlugin.


Hello @TomG ,

Really appreciate your prompt reply!

I read the article you provided, and I’m wondering if I could set “specific time choice” instead of a time range in the survey, which is not covered in the article now. Foe example, I would love to set time slots such as Wednesday: 10:00, 10:30, 11:10 ; Thursday:11:00, 11:30,  and I don’t want any other time slots to be selected, so it’s not available to use minMaxTimePlugin which could only support time range.

If you know about how to address this issue, please let me know. Thank you so much!!  


@bhaemily,

A date/time picker really isn’t well suited for picking specific time slots.  You might be able to modify it with JS, but it would be difficult.

Maybe you should use a different question type like multiple choice (maybe more than one) or drill-down.


Hi @TomG ,

Thanks for recommendation! Actually I’m now trying Javascript but it seems not that easy to set mechanism for picking specific time slots. Would be very appreciated if you have know-how on that, thank you and have a nice day!😊

 


Hi @TomG ,

Thanks for recommendation! Actually I’m now trying Javascript but it seems not that easy to set mechanism for picking specific time slots. Would be very appreciated if you have know-how on that, thank you and have a nice day!😊

 

I haven’t tried it.  You’ll basically have to hack it to make it do something it isn’t intended to do. Hence, my comment of using a different approach.


@TomG 

Got it! Thank you for reminder and instruction again!

 


@bhaemily,

A date/time picker really isn’t well suited for picking specific time slots.  You might be able to modify it with JS, but it would be difficult.

Maybe you should use a different question type like multiple choice (maybe more than one) or drill-down.

Hi, 

I also need some feature similar to this. My following question is: if I set a calendar picker first, then set a multi-selection question for them to pick a timeslot. Is that possible to disable those date/time selected by others? Many thanks. 


Hi, 

I also need some feature similar to this. My following question is: if I set a calendar picker first, then set a multi-selection question for them to pick a timeslot. Is that possible to disable those date/time selected by others? Many thanks. 

Qualtrics isn’t well suited to this. You could add a quota for each time slot then hide time slots if the quota is met, but the problem is the quotas aren’t incremented until the survey is complete so respondents with overlapping responses could sign up for the same time slot. 

You should consider using a service such as calendly to manage the time slots and integrate it with your survey.


Hi, 

I also need some feature similar to this. My following question is: if I set a calendar picker first, then set a multi-selection question for them to pick a timeslot. Is that possible to disable those date/time selected by others? Many thanks. 

Qualtrics isn’t well suited to this. You could add a quota for each time slot then hide time slots if the quota is met, but the problem is the quotas aren’t incremented until the survey is complete so respondents with overlapping responses could sign up for the same time slot. 

You should consider using a service such as calendly to manage the time slots and integrate it with your survey.

Thank you for your reply, is that possible to DIY these features with JS? 


 

Thank you for your reply, is that possible to DIY these features with JS? 

I’m not sure I’m understanding your question correctly. It is possible to embed calendly into your survey.  However, a potentially much easier solution it to redirect the respondents you want to schedule to calendly at the end of survey.


I’m trying to add time selection to my calendar question. I’d really appreciate any help to solve this problem. 

  1. I need help in making the time selection display on the calendar
  2. Then limit the range of time to specific hours of the day.

This is the JS I have for my question

------------------------------------------------------------------------------------------------------------------------

Qualtrics.SurveyEngine.addOnload(function()
{
  
jQuery("#"+this.questionId+" .InputText").flatpickr({

minDate: new Date().fp_incr(3) ,

    dateFormat: "d/m/Y"});
});

 

 

I also would like to set up an email trigger that sends out 3 days after the date selected in the survey to remind users to submit another form.

Any help would be much appreciated.


Leave a Reply