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 3 years 11 months 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 3 years 11 months 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: 3 years 11 months ago by floccs.
The administrator has disabled public write access.

Time question (Date question-like) is not working 3 years 11 months 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 3 years 11 months ago #87064

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6317
  • Thank you received: 1407
  • Karma: 546
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 3 years 11 months 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: 3 years 11 months ago by floccs.
The administrator has disabled public write access.

Time question (Date question-like) is not working 3 years 11 months 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 3 years 11 months ago #87150

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9352
  • Thank you received: 1340
  • Karma: 386
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Time question (Date question-like) is not working 3 years 11 months 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 3 years 11 months ago #87193

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9352
  • Thank you received: 1340
  • Karma: 386
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Time question (Date question-like) is not working 3 years 11 months 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.
  • Page:
  • 1
  • 2
Time to create page: 0.263 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form