April 29th, 2003, 11:18 AM
Join Date: Apr 2003
Time spent in forums: < 1 sec
Reputation Power: 0
Display Current Date In The Select Box
I am tyring to display a bunch of dates using the drop down menu is my jsp page using the following code:
Check Schedule For <select size="1" name="chk_Date">
for (int i=0 ; i < 13; i++)
<option value="cur"><%=(new java.text.SimpleDateFormat("MM/dd/yyyy")).format(cal.getTime()) %>
<% } %>
The select drop down display previous 6 days from current date & the future 6 dates from the current date. I want the drop down to show the current date when accessing this page. Right now it goes to the last date in the list, instead it should select the current date by default & display that in the drop down when this page is opened.
Any ideas & any help would be highly; appreciated????
Thanks in advance.....