SPSS data file

More
3 years 3 months ago #118885 by gstjason
gstjason created the topic: SPSS data file
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.

More
3 years 3 months ago - 3 years 3 months ago #118895 by tpartner
tpartner replied the 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:

<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 3 months ago by tpartner.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!