Welcome to the LimeSurvey Community Forum

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

Date - 60 days (dynamic)

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164400 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
...sample survey attached:

File Attachment:

File Name: limesurvey...2633.lss
File Size:13 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rbernhardthki
  • rbernhardthki's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago #164401 by rbernhardthki
Replied by rbernhardthki on topic Date - 60 days (dynamic)
Thanks, dont know how to view samples. I will try to convert to epoch
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164402 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
Just import the survey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164403 by Joffm
Replied by Joffm on topic Date - 60 days (dynamic)
Here a sample survey

File Attachment:

File Name: limesurvey...5564.lss
File Size:22 KB

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • rbernhardthki
  • rbernhardthki's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago #164406 by rbernhardthki
Replied by rbernhardthki on topic Date - 60 days (dynamic)
Ahh, changing the question format to Y-m-d and now it works like a charm.

one more thing. I am using the basic boostwatch theme and have a modified one where I changed the font color for the Tips and a custom CCS to change the question background to white.

On neither of them the date popup work, but on the imported survey (which also uses bootswatch) when you click the date field it comes up with the Date selector. Am I missing a setting?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164407 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
It would be interesting to know which solution worked for you. :)

Regarding the date picker not appearing, do you have any JavaScript errors in the console?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago - 6 years 8 months ago #164408 by Joffm
Replied by Joffm on topic Date - 60 days (dynamic)
Hi, sorry,
we talked a lot not seeing that you still stayed to your "d/m/Y".
Yes in date/time functions you have to use the database (mysql) format. "Y-m-d".

Two samples at the same time. Tony was a few seconds faster.
Maybe because I am watching the Speed Skating of the Olympics.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 8 months ago by Joffm.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164409 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
I've had enough of you Dutch and winning speed skating!!! :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rbernhardthki
  • rbernhardthki's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago #164411 by rbernhardthki
Replied by rbernhardthki on topic Date - 60 days (dynamic)
Right:

Solution that worked: (strtotime(date('Y-m-d')) - strtotime(CommissionDate.shown)) <= (60 * 60 * 24 * 60)

Imported tpartner's sample

Where can I see console errors?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164414 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
Click F12 and then "Console".

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rbernhardthki
  • rbernhardthki's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 8 months ago #164415 by rbernhardthki
Replied by rbernhardthki on topic Date - 60 days (dynamic)
Ahh, that console.

only a few:


Attachments:
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164418 by tpartner
Replied by tpartner on topic Date - 60 days (dynamic)
How did you implement the date picker? It looks like it's trying to use jQuery UI whereas it should be using bootstrap-datetimepicker only.

Did you try with a core template?

Cheers,
Tony Partner

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

Lime-years ahead

Online-surveys for every purse and purpose