- Posts: 116
- Thank you received: 0
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
- stevelegare
- Topic Author
- Offline
- Premium Member
Less
More
9 years 1 week ago #118339
by stevelegare
Add a date/time question in a Array (Texts) question was created 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
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
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
9 years 1 week ago #118367
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Add a date/time question in a Array (Texts) question
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:
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.
- stevelegare
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 116
- Thank you received: 0
9 years 1 week ago #118378
by stevelegare
Replied by stevelegare on topic Add a date/time question in a Array (Texts) question
Wow!
Thanks a lot for this beautiful snippet of code
Thanks a lot for this beautiful snippet of code
The topic has been locked.
- lemmon
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
5 years 1 month ago #180236
by lemmon
Replied by lemmon on topic Add a date/time question in a Array (Texts) question
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.
- lemmon
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
5 years 1 month ago #180237
by lemmon
Replied by lemmon on topic Add a date/time question in a Array (Texts) question
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
www.upwork.com/jobs/~012b51e5ed2f695aaf
The topic has been locked.