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,883 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordmultiple challenge 12 154
github account with ecipse 1 56
add projects t working set in maven 2 37
intellij error 2 27
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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.

679 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