- Posts: 51
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
maximum and minimum date requirement doesn't work
- LISHANGQI
- Topic Author
- Offline
- Senior Member
Less
More
1 year 9 months ago - 1 year 9 months ago #228875
by LISHANGQI
maximum and minimum date requirement doesn't work was created by LISHANGQI
Please help us help you and fill where relevant:
Your LimeSurvey version: [3.28]
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================
Dear experts,I get a problem with my date question. I put {date("Y-m-d",strtotime("today")-60*60*24*30*2)} and {date("Y-m-d",strtotime("today"))}as the minimum and maximum limit values of the date but when I answer questions with correct date, the question warned that the inputed date is incorrect. Maybe it's a bug in the 3.28 version? May I get your help? Thanks in advance!
Your LimeSurvey version: [3.28]
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================
Dear experts,I get a problem with my date question. I put {date("Y-m-d",strtotime("today")-60*60*24*30*2)} and {date("Y-m-d",strtotime("today"))}as the minimum and maximum limit values of the date but when I answer questions with correct date, the question warned that the inputed date is incorrect. Maybe it's a bug in the 3.28 version? May I get your help? Thanks in advance!
Attachments:
Last edit: 1 year 9 months ago by LISHANGQI.
Please Log in to join the conversation.
- holch
- Away
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
1 year 9 months ago #228882
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic maximum and minimum date requirement doesn't work
You write Y-m-d in your code, but you show d-m-Y, what is that about?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Please Log in to join the conversation.
- LISHANGQI
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
1 year 9 months ago #228884
by LISHANGQI
Replied by LISHANGQI on topic maximum and minimum date requirement doesn't work
Hi holch, it seems to depend on my input format, but this is not the reason. I've changed my input format to yyyy-mm-dd but the problem still remains.
Attachments:
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12715
- Thank you received: 3926
1 year 9 months ago - 1 year 9 months ago #228887
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic maximum and minimum date requirement doesn't work
1. option:
min date: "-60 days"
max date: "now"
2. option
min date: date("Y-m-d",strtotime('now')-60*60*60*24)
max date: date("Y-m-d",strtotime('now'))
[url] manual.limesurvey.org/Question_type_-_Da..._date_.28date_min.29 [/url]
min date: "-60 days"
max date: "now"
2. option
min date: date("Y-m-d",strtotime('now')-60*60*60*24)
max date: date("Y-m-d",strtotime('now'))
[url] manual.limesurvey.org/Question_type_-_Da..._date_.28date_min.29 [/url]
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 9 months ago by Joffm.
The following user(s) said Thank You: holch
Please Log in to join the conversation.
- LISHANGQI
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 1
1 year 9 months ago #228908
by LISHANGQI
Replied by LISHANGQI on topic maximum and minimum date requirement doesn't work
Thanks a lot, Joffm, it works now! The problem is caused by using"today" instead of "now".
Please Log in to join the conversation.