Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Add a date/time question in a Array (Texts) question

More
11 years 6 months ago #118339 by stevelegare
Hi all,
I need to insert a calendar (date/time question) in the last answer of a Array(text) question.
Can I do it and do you have an example?
Thanks
The topic has been locked.
More
11 years 6 months ago #118367 by tpartner
Rather than using the LimeSurvey Date question, you could apply your own a jQuery UI Datpickers to those inputs.

Something like this in the source of the question:

Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Apply some classes $('tr.subquestion-list td.answer-item:last-child', thisQuestion).addClass('last-column-item'); // Insert the datepickers $('.last-column-item input[type="text"]', thisQuestion).datepicker({ dateFormat: "dd/mm/yy" }); // Fix up the datepicker position $('.last-column-item input[type="text"]', thisQuestion).on('click focus', function() { $("#ui-datepicker-div").position({ my: "left top", at: "left-3 top-3", of: $(this) }); }); }); </script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
11 years 6 months ago #118378 by stevelegare
Wow!
Thanks a lot for this beautiful snippet of code :-)
The topic has been locked.
More
7 years 7 months ago #180236 by lemmon
This does not work with 3.x Vanilla. Does anyone know how to add a datepicker to a specific column in a text array under 3.x Vanilla Theme?
The topic has been locked.
More
7 years 7 months ago #180237 by lemmon
It appears that I cannot edit my post with this forum software. In case anyone is interested, I have posted a job on upwork for this:

www.upwork.com/jobs/~012b51e5ed2f695aaf
The topic has been locked.
Moderators: tpartner, holch

Lime-years ahead

Online-surveys for every purse and purpose