Date Picker with Matrix Table | XM Community
Solved

Date Picker with Matrix Table

  • 5 February 2019
  • 7 replies
  • 51 views

Userlevel 4
Badge +20
Hello - I have found a previous post about using a calendar date picker and was able to get it to work in a free text question. However, I am unable to get the date picker to work with a matrix question. Is the calendar date picker possible on the matrix question? If so, what am I doing wrong? I followed the same steps that got it to work in the free text question.
icon

Best answer by TomG 5 February 2019, 17:06

View original

7 replies

Userlevel 7
Badge +27
> @KOgles said:
> Hello - I have found a previous post about using a calendar date picker and was able to get it to work in a free text question. However, I am unable to get the date picker to work with a matrix question. Is the calendar date picker possible on the matrix question? If so, what am I doing wrong? I followed the same steps that got it to work in the free text question.

You can attach a date picker to any text input field. The only difference between different types of questions is how you identify and select the text input field. Use the browser's inspect feature to look at the input element and figure out how to select it.
Userlevel 4
Badge +20
!
Thanks TomG! Unfortunately, I am not a dev. I am copying, pasting and stumbling through the few things I've picked up here and there. I have attached a screenshot that shows both the matrix text field on inspect and the free text field on inspect. I know that they are different but do not understand what the differences are.
Userlevel 7
Badge +27
@KOgles said:
> !
> Thanks TomG! Unfortunately, I am not a dev. I am copying, pasting and stumbling through the few things I've picked up here and there. I have attached a screenshot that shows both the matrix text field on inspect and the free text field on inspect. I know that they are different but do not understand what the differences are.
The code in the original post used the class InputText to select the text input. In a matrix the input field doesn't have that class, which is why it didn't work. Since you only have one input column in your matrix, you have two options.
1. Change your matrix to a text input form (which has the InputText class)
2. Use the selector `input[type=text]` in place of `.InputText` on the matrix.
Userlevel 4
Badge +20
Thank you TomG! Changing to input[type=text] did the trick!!!
Userlevel 6
Badge +5

TomG I just stumbled on this page. How would I set the javascript to only show the date picker on column 2 of the Matrix?

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/27069#Comment_27069Use the selector ".c5 input[type=text]"

Userlevel 6
Badge +5

TomG Thank You!

Leave a Reply