Welcome to the LimeSurvey Community Forum

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

Minimum date interval: whats going on her

  • lovepade
  • lovepade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #140803 by lovepade
Hi,

I have a surveyquestion of type "date".

Minimum allowed date is ["now"] (without square brackets, with quotes)
Maximum allowed date is [ date("Y-m-d",strtotime("+6 months"))] (without square brackets).

Date format is yyyy-mm-dd.

But when testing the survey I get this (see attached image).

The validation message seems correct: "Answer must be between 2016-08-17 and 2017-02-17"
But: I can only choose the year 2016, and even with the input 2016-08-30 (example) the input is not accepted?

Why is this? I hope somebody can advise me.
The topic has been locked.
  • lovepade
  • lovepade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #140804 by lovepade
Replied by lovepade on topic Minimum date interval: whats going on her
Hi again

So I have changed minimum date from ["now"] to [date("Y-m-d", strtotime("+1 day"))]. And now I can input a valid date. But still only this current year? e.g. even though maximum date is calculated correctly as 2017-02-17 - I can still only choose a date in 2016.

Strange?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #140807 by Joffm
Replied by Joffm on topic Minimum date interval: whats going on her
Hi, lovepade,
well, the "now" seems not to be allowed. I also get an error in the logic file.

But with
min: date("Y-m-d")
max: date("Y-m-d",strtotime("+6 months"))
I cannot reproduce the error. I work with LS 2.50 160812. And you?

See screenshot: A date in the next year.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • lovepade
  • lovepade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #140809 by lovepade
Replied by lovepade on topic Minimum date interval: whats going on her
OK - I am still on version 2.05+. A little reluctant to take the plunge and upgrade. But maybe this is the final reason.

using firefox 47.0 btw
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago - 7 years 7 months ago #140816 by Joffm
Replied by Joffm on topic Minimum date interval: whats going on her
Hi,
well, you know this is the indispensable information: Version of LS.

I tried in 2.06, default template, same values of min and max as above, and ...
No issue.

I have no idea, what happens.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 years 7 months ago by Joffm. Reason: Ergänzung
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 6 months ago #140845 by tpartner
Replied by tpartner on topic Minimum date interval: whats going on her

OK - I am still on version 2.05+. A little reluctant to take the plunge and upgrade.

Upgrading to the very stable 2.06 LTS version will not require any template modifications.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose