| From | Sent On | Attachments |
|---|---|---|
| Shiraz Kanga | Sep 20, 2000 8:06 pm | |
| Shawn Bayern | Sep 20, 2000 8:21 pm | |
| Joseph B. Ottinger | Sep 20, 2000 8:34 pm | |
| Craig R. McClanahan | Sep 20, 2000 8:49 pm | |
| Craig R. McClanahan | Sep 20, 2000 8:51 pm | |
| Glenn Nielsen | Sep 21, 2000 8:40 am | |
| Shiraz Kanga | Sep 21, 2000 10:11 am | |
| Craig R. McClanahan | Sep 21, 2000 10:18 am | |
| Shawn Bayern | Sep 21, 2000 10:53 am | |
| Hans Bergsten | Sep 21, 2000 11:52 am | |
| Shawn Bayern | Sep 21, 2000 12:09 pm | |
| Shiraz Kanga | Sep 21, 2000 1:18 pm | |
| Shawn Bayern | Sep 21, 2000 1:20 pm | |
| Hans Bergsten | Sep 21, 2000 2:00 pm | |
| Wong Kok Wai | Sep 21, 2000 9:36 pm | |
| Shiraz Kanga | Sep 22, 2000 1:35 am | |
| Shiraz Kanga | Sep 22, 2000 1:35 am | |
| Wong Kok Wai | Sep 22, 2000 4:13 am | |
| Shiraz Kanga | Sep 22, 2000 9:47 am | |
| Hans Bergsten | Sep 22, 2000 11:45 am | |
| Craig R. McClanahan | Sep 22, 2000 11:48 am | |
| Hans Bergsten | Sep 22, 2000 12:13 pm | |
| Justyna Horwat | Sep 22, 2000 1:18 pm | |
| Hans Bergsten | Sep 22, 2000 1:44 pm | |
| Glenn Nielsen | Sep 22, 2000 1:49 pm | |
| Eduardo Pelegri--Llopart | Sep 24, 2000 1:27 pm |
| Subject: | Re: Contribution | |
|---|---|---|
| From: | Shiraz Kanga (ska...@bigfoot.com) | |
| Date: | Sep 22, 2000 1:35:53 am | |
| List: | org.apache.jakarta.taglibs-dev | |
Here's one way to get the selected date. The urls generated by the calendar tag
have
a parameter called "CalendarTagDate" which you can simply grab from the request.
BTW
The name of this parameter can be changed by using the dateParam atribute of the
tag. Eg: <examples:cal dateParam="MyDate">
This date is in the format YYYYMMDD. The code below can convert this format into
a
java Calendar object.
private Calendar parseDate (String s) { int currYear = Integer.parseInt (s.substring (0, 4)); int currMonth = Integer.parseInt (s.substring (4, 6)); int currDate = Integer.parseInt (s.substring (6, 8)); return new GregorianCalendar (currYear, currMonth, currDate); }
Hope this helps. I do not understand the second question.
shiraz
Wong Kok Wai wrote:
Hi,
Thanks for sharing your code. A few quick questions: a) how do I get the current selected date? b) is there some sort of "notification" when a change happens?
thanks
Shiraz Kanga wrote:
Okay - Take a look at http://www.devport.com/taglib/ and you should see the code (CalendarTag.java) and some other stuff.
The tag usage is very simple. The demo.jsp file simply uses <examples:cal> with no parameters, while demo2.jsp sets some of the parameters like using images for the arrows instead of the default << and >> and so on.
Thanks
shiraz
Shawn Bayern wrote:
On Wed, 20 Sep 2000, Shiraz Kanga wrote:
I'd like to donate this code to the Apache Group. Can anyone tell me how this is done? Should I just post it here as an attachment? I couldnt find out how to do this from the jakarta web site.
I'm not sure there's a standard procedure, but posting the code at a URL that we can access would definitely be convenient.
Feel free to try it out at http://www.devport.com:8080/examples/demo.jsp
The demo looks great, by the way. Thanks for your offer to contribute,
Shawn





