Date Picker and Validation in the Text Field | XM Community
Skip to main content
Solved

Date Picker and Validation in the Text Field


Forum|alt.badge.img+3
To whom it may concern, I was able to apply the "date picker" to a text field. However, I noticed quickly that I seem to have problems with validation on the text field using date picker at the same time. Want to know if it is possible to either: 1. Prevent user entry into the text field - forcing the use of the "Date Picker" 2. Add validation for the text field, should the user type into the field, the date format of the "date picker" selection is extended to that field so I don't end up with gobblygook. See image: ! Thank you.

Best answer by Anonymous

Hello @JSwiez , Paste the below code to js(Onready) of the text entry question: jQuery("#"+this.questionId+" .InputText").attr("readonly",true); This will prevent user to type something in text box.
View original

2 replies

  • 0 replies
  • Answer
  • March 26, 2019
Hello @JSwiez , Paste the below code to js(Onready) of the text entry question: jQuery("#"+this.questionId+" .InputText").attr("readonly",true); This will prevent user to type something in text box.

Forum|alt.badge.img+3
  • Author
  • 12 replies
  • March 26, 2019
Thank you! That helped! Have a great day.

Leave a Reply