Date is Not Valid?

More
4 years 2 months ago #100267 by lmw1
lmw1 created the topic: Date is Not Valid?
I have a simple month/year drop-down, but whenever you select the month and year from it - it says - DATE IS NOT VALID. Even does it when I set it to "not" mandatory.

Any ideas why this is occurring and perhaps a fix?

Respectfully,
Leonard Michael

Please Log in to join the conversation.

More
4 years 2 months ago #100288 by mfaber
mfaber replied the topic: Date is Not Valid?
Hi, hard to say without more info. Can you provide an example survey showing the problem (1 question is enough)? What is you LS version?
The following user(s) said Thank You: lmw1

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #100312 by lmw1
lmw1 replied the topic: Date is Not Valid?
It's just the standard month/year dropdown. I didn't do anything out of the ordinary with it.

I have it set to display as mm/yyyy. Would that cause an issue?

Version 2.00+ Build 130802

Respectfully,
Leonard Michael
Last Edit: 4 years 2 months ago by lmw1. Reason: Add text

Please Log in to join the conversation.

More
4 years 2 months ago #100317 by c_schmitz
c_schmitz replied the topic: Date is Not Valid?
Providing a small sample survey is the best way for us to find out :)

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
4 years 2 months ago #100318 by lmw1
lmw1 replied the topic: Date is Not Valid?
How would I do that?

Thank you for trying to help me!

Respectfully,
Leonard Michael

Please Log in to join the conversation.

More
4 years 2 months ago #100321 by c_schmitz
c_schmitz replied the topic: Date is Not Valid?
Create a small sample survey with that one question and export it as .lss file and attach it to a message here.

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #100322 by lmw1
lmw1 replied the topic: Date is Not Valid?
How about an .lsq file?

Couldn't find a way to export a .lss file.

File Attachment:

File Name: h3995aa7.lsq
File Size:2 KB


Respectfully,
Leonard Michael
Attachments:
Last Edit: 4 years 2 months ago by lmw1. Reason: add file

Please Log in to join the conversation.

More
4 years 2 months ago #100350 by mfaber
mfaber replied the topic: Date is Not Valid?
lmw1: I see...problem is that just a month and a year is indeed not a valid date. Think of it as eg. 2012-08-undefined. This does not save well to the data base. As a work around I would use two questions with dropdownboxes (one for year, one for month).

Carsten: I think the date/time question could indeed be flexible enough to also work with year and month only. It's a use case that I often have as well. I would suggest to save dates always with the 1st of the month if a mask without day is given. We also take a full date and write e.g. 2012-08-24 00:00:00 to the DB. We probably even write 1900-01-01 12:54 to the DB if only a mask for a time is given and 12:54 is entered.

Please Log in to join the conversation.

More
4 years 2 months ago #100351 by mfaber
mfaber replied the topic: Date is Not Valid?
lmw1: You may also use a "multiple numerical input" question. Set maximum characters to 2. Use one subquestion for year (YY), one for month (MM). Participants then have to type, but layout-wise it's nicer to have the two fields in one question and closer together, i think.

Please Log in to join the conversation.

More
4 years 2 months ago #100369 by mfaber
mfaber replied the topic: Date is Not Valid?
lmw1: I had a look in the code and it was actually a bug :)
It should be fixed in the next release (both 2.05 and 2.00+). Thanks for bringing this to our attention.
The following user(s) said Thank You: lmw1

Please Log in to join the conversation.

More
4 years 2 months ago #100373 by lmw1
lmw1 replied the topic: Date is Not Valid?
Thanks guys!

So in the meantime can I use your suggestion above your most previous post?

Respectfully,
Leonard Michael

Please Log in to join the conversation.

More
4 years 2 months ago #100421 by mfaber
mfaber replied the topic: Date is Not Valid?
sure, yes. if you do not want to wait for the next version to come out AND you are a little tech savvy AND you have access to your server you can replace the file in the limesurvey/scripts directory on your server with the following one: raw.github.com/LimeSurvey/LimeSurvey/3c3...0635/scripts/date.js

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!