- Posts: 32
- Thank you received: 0
SPSS data file
3 years 10 months 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!
Please Log in or Create an account to join the conversation.
3 years 10 months ago - 3 years 10 months ago #118895
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 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:
Set up your survey to use JavaScript and place the following script in the source of a short-text type question:
<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: 3 years 10 months ago by tpartner.
Please Log in or Create an account to join the conversation.