Welcome, Guest
Username: Password: Remember me

TOPIC: Restricted date range 2.00

Restricted date range 2.00 4 months 3 weeks ago #102052

Hi Guys,

We are using LimeSurvey 2.00+ Build: 131122 and we want a restricted on the dates for some questions. We have found code which works for 1.90 but it doesn't seem to work (for us anyway) in 2.00.

1) What script do we need to ensure that a date picker is limited to before a certain date (November 24th for us)
2) What script do we need to ensure that a date picker is limited to before a certain date (November 24th for us) but after a certain date for another question?

Our current code is (for 1, taken from LimeSurvey wiki):

<script type="text/javascript" charset="utf-8">

$(document).ready(function() {

var qID = "186597X383X5246";

$('#question'+qID+' .popupdate').datepicker( 'option', 'maxDate', new Date(2013, 11-1, 24) );

});

</script>

Which does not work and doesn't throw anything in my javascript console.

I realize that this is extremely straightforward in 2.05, however we would rather used a released development.

Thank you so much!

Mark
The administrator has disabled public write access.

Restricted date range 2.00 4 months 3 weeks ago #102059

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 933
  • Thank you received: 193
  • Karma: 62
Hello,

Your code shows a confusion about "qid" (=question ID) and "SGQ" (survey, group, question IDs);
"qid" is only the last component of the SGQ code.

var qID = "186597X383X5246"

should be:

var qID = "5246";

Hope this solves your problem
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 4 months 3 weeks ago by Ben_V.
The administrator has disabled public write access.

Restricted date range 2.00 4 months 3 weeks ago #102084

Yup it did, you are amazing Ben.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.105 seconds
Donation Image