All right, I realize that this is probably a silly problem, but it is nevertheless a problem.
When using the date field in a data form, if you specify a year range that includes a triple-digit year, such as, say, 154, the date returned, no matter what is selected by the user in the form, is always the current date (February 06 2015, in this case). I've tried adding a 0 to make it '0154', but this doesn't fix the problem. I've tried adding minDate and maxDate, but this only returns a date of February 06 154, ignoring any other month/day combination the user selects.
This seems to be a problem with the datepicker module as provided by jQuery. You can see that the same thing happens on their site. So, I do not think Wikidot can fix this.
However, Wikidot has recently introduced a new feature that is perfect for this. What you can do is actually subtract 1000 years from the field's output so that 1154 now becomes 154. This can be done as so:
Internally, it is stored as 1154, but the display will show 154 instead.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Brilliant, thank you!
Yep, this little hack will work but its dirty workaround and it fails when you put current year 2015 (for example) it substract 1000 years from it :/
And indeed its caused by UI datepicker limitations, it works for example at: http://eternicode.github.io/bootstrap-datepicker/?#sandbox
Bartłomiej Bąkowski @ Wikidot Inc.
';.;' TeRq (Write PM)
Well, to put 2015 in, you just need to put in 3015 ;) Indeed, quite dirty…
EDIT: Although, it would be really easy to fix that behavior if #expr could be nested in #ifexpr. That doesn't seem possible at the moment, but I'll do some playing around.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Could this be marked as Rejected, since it is not a bug with Wikidot, but with the jQuery library? Would be good to close off a bunch of old bugs…
Hopefully the jQuery team fixes (or has already fixed since February 2015!!) this issue.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server