Solved

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

Posted on 2007-03-27
3
10,060 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 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

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
A solution for Fortify Path Manipulation.
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.

623 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