Re: Date and select Tags

"Jonathan Ellis" <[email protected]> Wed, 15 Nov 2006 19:44:51 -0800
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
> 1.   I'm writing out a list of dates in a form, but  when I enter a
> date with any of the JS calendars only the first value changes.

Each f:date is independant of the others, so yes, only one should change
at a time when you pick a new date, if that's what you meant.

> 2.   The last selected value in the select box is displayed for all
> the select boxes of the same name (not reflecting what is in the
> database, I've tried the value and default arg).

Yes, that's how it works.  All it knows is what was posted, so you
shouldn't put multiple forms on the same pages with the same input names
unless you know what you're doing. :)

> 3.   How do you format the calendar to input yyyy-mm-dd format.

<f:date name=date1 format="yyyy-MM-dd" />

(case is important, mm would be minutes, which doesn't really make sense
here.)

> <script language="JavaScript" src="/_util/form_calendar.js"></script>
> <script language="JavaScript">
>   document.write(getCalendarStyles());
>   var _calendar = new CalendarPopup("calendardiv");
> </script>

You don't need to put that in manually; Spyce will generate it for you.

-Jonathan
-- 
C++ is history repeated as tragedy. Java is history repeated as farce.  --Scott McKay


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV