Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Time question (Date question-like) is not working

Time question (Date question-like) is not working 4 years 1 month ago #86975

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
I am using Time question (Date question-like) to submit the time
The code mentioned in workaround is not working.
I am using the following code in source code

Time question

<script src="/upload/surveys/{SID}/jquery-ui-timepicker-addon.js"></script>

<script>
$(document).ready(function(){

$('#answer{SGQ}').timepicker({
timeText: 'Time', //here translation
hourText: 'hour', //here translation
minuteText: 'minute', //here translation
closeText: 'Done' //here translation
});

$('#answer{SGQ}').attr('readonly', 'readonly');

$( "<style>"
+".ui-widget-header, .ui-datepicker-current { display:none; }"
+".ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }"
+".ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }"
+" }"
+"</style>").appendTo( "head" );

});
</script>


and Question type is : short free text.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #86983

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
Download the file at http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js and upload it to your survey.
Notice that the workaround has been tested only under Limesurvey 1.92+
Last Edit: 4 years 1 month ago by floccs.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87049

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
The link trentrichardson.com/examples/timepicker/...-timepicker-addon.js is not working.
it shows


Forbidden

You don't have permission to access /examples/timepicker/jquery-ui-timepicker-addon.js on this server.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87064

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Have a look at Mobiscroll - Demo.mobiscroll.com/#Demo=datetime&mode=clickpick. I've tested it successfuly on both PCs and iPads.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87069

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
Please, retry (no copy/paste the link, just click). Here it's working
Last Edit: 4 years 1 month ago by floccs.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87149

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
Now link is working. where i have to place this .js file ???
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87150

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
tpartner wrote:
Have a look at Mobiscroll - Demo.mobiscroll.com/#Demo=datetime&mode=clickpick. I've tested it successfuly on both PCs and iPads.
Hello,

I really think we have to:
- Use input type="date" or input type="time" for date/time question type.
- Use js only if browser don't understand type="date/time" input, and DON'T sue js if browser understand input type.

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87189

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
Am sorry to say but i didn't understand how to use input type "time"
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87193

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9600
  • Thank you received: 1376
  • Karma: 390
amritdeep wrote:
Am sorry to say but i didn't understand how to use input type "time"
Sorry, it's a a developer comment. It's for LS 2.0.

Here, with 1.92, you have to use some js workaround.

Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87194

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
I am using Time question (Date question-like) workaround. Where i have to place trentrichardson.com/examples/timepicker/...-timepicker-addon.js file in my survey.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87198

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
You have to upload the script as a resource from the general settings of your survey.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87200

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
After uploading the script as a resource the following warning is displayed


Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\limesurvey\admin\import_resources_zip.php on line 190
Last Edit: 4 years 1 month ago by amritdeep.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87203

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
Did you zip the file?
Last Edit: 4 years 1 month ago by floccs.
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87204

  • amritdeep
  • amritdeep's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Karma: 1
yes. I have zip the file "jquery-ui-timepicker-addon.js" to "jquery-ui-timepicker-addon.zip". Then i have browse the zip file as resource in general setting of survey and then click on "Import Resouces ZIP archive" button
The administrator has disabled public write access.

Time question (Date question-like) is not working 4 years 1 month ago #87205

  • floccs
  • floccs's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
I'm sorry but I can't help you anymore. In my installation it's all working fine
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.779 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form