Date Picker with Matrix Table | Experience Community
Skip to main content
Solved

Date Picker with Matrix Table

  • Feb 5, 2019 2:16 PM UTC
  • 7 replies
  • 667 views

KOgles
Level 3 ●●●
Forum|alt.badge.img+21
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.

Best answer by TomG

@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.
View original

7 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Feb 5, 2019 3:10 PM UTC
> @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.

KOgles
Level 3 ●●●
Forum|alt.badge.img+21
  • Author
  • Level 3 ●●●
  • Feb 5, 2019 3:47 PM UTC
! 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.

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • Feb 5, 2019 4:06 PM UTC
@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.

KOgles
Level 3 ●●●
Forum|alt.badge.img+21
  • Author
  • Level 3 ●●●
  • Feb 5, 2019 6:11 PM UTC
Thank you TomG! Changing to input[type=text] did the trick!!!

Forum|alt.badge.img+5
  • Level 2 ●●
  • Jun 23, 2020 7:19 PM UTC

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?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Jun 23, 2020 8:25 PM UTC

Forum|alt.badge.img+5
  • Level 2 ●●
  • Jun 24, 2020 1:29 PM UTC

TomG Thank You!