Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

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

Time question (Date question-like) is not working 1 year 10 months ago #86975

  • amritdeep
  • amritdeep's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 34
  • Karma: 0
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.

Re: Time question (Date question-like) is not working 1 year 10 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: 1 year 10 months ago by floccs.
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87049

  • amritdeep
  • amritdeep's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 34
  • Karma: 0
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.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87064

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 348
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 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: 1 year 10 months ago by floccs.
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87149

  • amritdeep
  • amritdeep's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 34
  • Karma: 0
Now link is working. where i have to place this .js file ???
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87150

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 241
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
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87189

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

Re: Time question (Date question-like) is not working 1 year 10 months ago #87193

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 241
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
The administrator has disabled public write access.

Re: Time question (Date question-like) is not working 1 year 10 months ago #87194

  • amritdeep
  • amritdeep's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 34
  • Karma: 0
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
Moderators: ITEd
Time to create page: 0.126 seconds
Donation Image