Restrict MM/DD/YYYY date range with Qualtrics date content validation | XM Community
Skip to main content
Question

Restrict MM/DD/YYYY date range with Qualtrics date content validation


Hi everyone - I'm using Qualtric's content validation for a date (MM/DD/YYYY) to get survey respondents' birthday. Is there any way to be able to keep this input format and restrict the date range so that people can't choose a date after the current date, and not a date before, say, 01/01/1900? Thanks!

6 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • June 5, 2020

Yes, I believe the only way to do it is with JavaScript, and it is quite complicated.


  • Author
  • 7 replies
  • June 5, 2020

https://www.qualtrics.com/community/discussion/comment/26317#Comment_26317Ah, darn - any chance you have any input on workaround ways to make it work? Open to changing the format but just want to make it easy for users to enter their birthday (don't want them to have to click backwards on a date picker)


Forum|alt.badge.img+3
  • Level 2 ●●
  • 50 replies
  • June 5, 2020

https://www.qualtrics.com/community/discussion/comment/26317#Comment_26317Would regex validation, rather than date validation plus js, be possible/easier?


  • Author
  • 7 replies
  • June 5, 2020

https://www.qualtrics.com/community/discussion/comment/26322#Comment_26322Sorry, I'm pretty new to this - would you mind explaining how to do regex validation?


Forum|alt.badge.img+3
  • Level 2 ●●
  • 50 replies
  • June 5, 2020

https://www.qualtrics.com/community/discussion/comment/26324#Comment_26324Actually, sorry, I should take my comment back. A regex would be too complicated, especially considering I forgot you were trying to factor in the current date, not a fixed range.


  • Author
  • 7 replies
  • June 5, 2020

https://www.qualtrics.com/community/discussion/comment/26325#Comment_26325Ah, no worries - yeah, I'd probably fix one end for the earliest date, but then I would want it to be up to the current date.


Leave a Reply