xoops forums

DaBoyz

Just popping in
Posted on: 2004/1/12 13:06
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#1

XoopsFormTextDateSelect

For a module i'm developping, I need to set date from 1900 to 20xx (for birthday) ... I used the function to display the calendar that permit to choose the date ...

I modify the line 38 in include/calendarjs.php :
cal.setRange(20002015);

to
cal.setRange(19002015);


It's working but the function uses TIMESTAMP format to store in the database but I use DATETIME (not limited until 1970), do you know how to modify the function to store the data with this DATETIME format and also retrieve date for modification ?

For those who speak french, I launched also a topic on the french site : here ...

DaBoyz

Just popping in
Posted on: 2004/1/12 18:23
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#2

Re: XoopsFormTextDateSelect

Up ... to avoid the abyss ...

DaBoyz

Just popping in
Posted on: 2004/1/12 22:57
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#3

Re: XoopsFormTextDateSelect

Is that to say that nobody need to use date before 1970 ???

PS : Excuse my hurry but I would like to have an answer ...

DaBoyz

Just popping in
Posted on: 2004/1/13 11:39
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#4

Re: XoopsFormTextDateSelect

Up ...

DaBoyz

Just popping in
Posted on: 2004/1/14 9:22
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#5

Re: XoopsFormTextDateSelect

Up ???

I could add that on the french topic, some persons (like me) would like to understand the choice of TimeStamp => limit from 1970 ? Or if a solution exists ...

DaBoyz

Just popping in
Posted on: 2004/1/14 11:49
DaBoyz
DaBoyz (Show more)
Just popping in
Posts: 79
Since: 2002/8/8 1
#6

Re: XoopsFormTextDateSelect

I did some tests and I found some answers (some modifications where made to the code) :

- I changed the type of field to DATE (for birthday, it's enough)
- If I enter or choose a value out of Unix TimeStamp (1945-12-12), this value is stored in the database ...
- But stil have the same problem when editing the value ...

EDIT => I found and changed to another method that works without the limit imposed by Unix TimeStamp ... Fall down little post !!! You're useless now and doesn't interest anybody at all