?
Solved

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

Posted on 2007-03-27
3
Medium Priority
?
10,196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
boonleng earned 1500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.

719 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