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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
instanceof  operator in java 26 86
Connect to IP Camera using Java 4 160
mapAB Challlenge 35 124
Non-recursive backtracking, using a stack 1 98
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 last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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.

912 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

17 Experts available now in Live!

Get 1:1 Help Now