Welcome to the LimeSurvey Community Forum

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

SPSS data file

  • gstjason
  • gstjason's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 weeks ago #118885 by gstjason
SPSS data file was created by gstjason
This the SPSS data file in which the data of Date of Birth cannot be properly captured when the default calendar was used in the survey link. Please let me know how to fix this. Thanks!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks ago - 9 years 3 weeks ago #118895 by tpartner
Replied by tpartner on topic SPSS data file
As a workaround, you could add your own jQuery UI datepicker to a short-text question.

Set up your survey to use JavaScript and place the following script in the source of a short-text type question:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).ready(function() {
 
    // Identify this question
    var thisQuestion = $('#question{QID}');
 
    // Insert the datepicker
    $('input[type="text"]', thisQuestion).datepicker({
      dateFormat: "dd/mm/yy",
      maxDate: new Date
    });  
 
    // Fix up the datepicker position
    $('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.
Last edit: 9 years 3 weeks ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose