PDA

View Full Version : DateField selectedDate displays wrong date?


henkedo
05-25-2005, 11:19 AM
Hi All.

I have a problem setting the date with the DateField component. It's 1 year and 1 month wrong?
item1_df.selectedDate = new Date(2005, 11, 22);
this gives '22 Dec 2005'.... WTF!?
and
item2_df.selectedDate = new Date(2005, 12, 10);
gives '10 Jan 2006'...?? WTF Again!

Does anybody know whats up? Any help appreciated!

.henkedo

madgett
05-28-2005, 08:56 AM
Heh, in the Flash Help: month An integer from 0 (January) to 11 (December)

January is 0 and December is 11. Yes, the earth is really 01100101 01100001 01110010 01110100 01101000 as well. :p