I have an issue with adapting the ‘select a date’ question from the Qualtrics library to the format I want to use. I got it from Qualtrics library > Demographics > Calendar & Date Questions > Select a date (matrix).
First I want to change the order: month - day - year into day - month - year, the dropdown lists of course need to follow this new order. Accordingly I want to translate everything into Dutch: ‘day’ → ‘dag’, ‘month’ → ‘maand’ and ‘year’ → ‘jaar’. Also the month dropdown list needs to be translated to Dutch. Last, I want to change the year range in the dropdown list to 1960-2011.
I tried to adapt this through Java script but I got very weird dropdown lists every time. Can someone help me out with this issue? Or does someone knows an easier way to let respondents enter their date of birth in a fixed format?
Thanks in advance!
Page 1 / 1
flatpickr is a much better date picker and integrates well with Qualtrics. There are a bunch of community posts about it. It supports any date format and many languages.
A second alternative if to use cleave.js to format the date as it is typed.
A final alternative (my least preferred) is to use a side-by-side with dropdowns in three columns.
Second vote for Flatpickr!
@TomG@EricT
Can you also maybe help me out with another question regarding to this topic? I would like to have my calendar displayed in a way that weeks are starting on Monday instead of on Sunday. How can I adapt this in the most easy way? I tried already different options but so far none of them seems to work? A screenshot of the Javascript would be very helpful!
Thanks in advance!
@AnnaW - One of the Flatpickr locale options is firstDayofWeek. See this.
I believe that’s my problem. I don’t know how to use the ‘locales’ or where (onload, onready or unload) and how to paste them correctly in Javascript. I always get an error of an invalid Javascript.
I believe that’s my problem. I don’t know how to use the ‘locales’ or where (onload, onready or unload) and how to paste them correctly in Javascript. I always get an error of an invalid Javascript.
I came back to my survey after working on other projects and now the flatpickr isn’t working anymore. Has there been an update or something that might have caused this?
Thanks in advance!
Hi @TomG
I came back to my survey after working on other projects and now the flatpickr isn’t working anymore. Has there been an update or something that might have caused this?
Thanks in advance!
It still works for me. Did you switch the survey to simple layout? That would explain it.
I have selected “classic lay-out”
This is pasted in the javascript of the header (contains also a code for a date format for another question)