Solved

JSP - Struts / Date field - need to display a calendar and allow the user to select the date

Posted on 2007-03-27
3
9,568 Views
Last Modified: 2013-11-24
I'm a beginner for Struts

I need to add a date field to the JSP form.

I do NOT know how to add a calendar and populate the selected date from to the form?

eg.where  the calendar image is clicked, it pops up the calendar and allows the user to select the date. After, the selected date is populated to the date field.

I know this is a common funtionality, but i just dont know what to do?

Notes I add the struts framework to the existing old jsp/servlet application.
Does Struts provide a feature for calendar?
0
Comment
Question by:LeanMoreTryMore
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
boonleng earned 500 total points
ID: 18805800
If you are using Struts 2 then yes there's a tag for date picker <s:datepicker>.

If you are using Struts 1 then you need to add the date picker script.
The following are some of the date picker sample code, you can find more from google.
http://dynamicdrive.com/dynamicindex7/jasoncalendar.htm
http://dynamicdrive.com/dynamicindex6/popcalendar2.htm
http://www.javascriptkit.com/script/script2/tengcalendar.shtml
1
 

Author Comment

by:LeanMoreTryMore
ID: 18811983
Sorry i'm new to Struts, how do i know what vesion of Struts i'm using...

0
 
LVL 14

Expert Comment

by:boonleng
ID: 18821490
Check the struts configuration xml, it will specify whether refering to 1.x dtd or 2.x dtd file.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now