- Posts: 8
- Thank you received: 0
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
- Topic Author
- Offline
- New Member
Less
More
7 years 7 months ago #140803
by lovepade
Minimum date interval: whats going on her was created 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.
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.
Attachments:
The topic has been locked.
- lovepade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
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?
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12713
- Thank you received: 3924
7 years 7 months ago #140807
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
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
Attachments:
The topic has been locked.
- lovepade
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
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
using firefox 47.0 btw
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12713
- Thank you received: 3924
7 years 7 months ago - 7 years 7 months ago #140816
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
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
Attachments:
Last edit: 7 years 7 months ago by Joffm. Reason: Ergänzung
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 6 months ago #140845
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 Minimum date interval: whats going on her
Upgrading to the very stable 2.06 LTS version will not require any template modifications.OK - I am still on version 2.05+. A little reluctant to take the plunge and upgrade.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.