0

Good afternoon:

As before, i use pop out calendar for DOB field, but is not so good for user to access. So my lecturer request maintain pop out calendar but add a method that can type the birth date on the text field according to user's choice.How can i use 2 method together for my DOB field? Thank you for answering.

Here is the code for DOB field at the moment..
[ASP]
<td width="40%">&nbsp;<input type="text" name="txtDate2" size="10" value="<%=DisplayDate(RsMember2("dtDOB"))%>" readonly>
<img border="0" src="Images/calendar.gif" width="19" height="19" onclick="javascript:show_calendar('frmUpdate.txtDate2');"></td>[ASP]

[JAVASCRIPT]
var weekend = [0,6];
var weekendColor = "#e0e0e0";
var fontface = "Verdana";
var fontsize = 2;
var gNow = new Date();
var ggWinCal;
isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
Calendar.Months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
// Non-Leap year Month days..
Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Leap year Month days..
Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function Calendar(p_item, p_WinCal, p_month, p_year, p_format) {
if ((p_month == null) && (p_year == null)) return;
if (p_WinCal == null)
this.gWinCal = ggWinCal;
else
this.gWinCal = p_WinCal;

if (p_month == null) {
this.gMonthName = null;
this.gMonth = null;
this.gYearly = true;
} else {
this.gMonthName = Calendar.get_month(p_month);
this.gMonth = new Number(p_month);
this.gYearly = false;
}
this.gYear = p_year;
this.gFormat = p_format;
this.gBGColor = "white";
this.gFGColor = "black";
this.gTextColor = "black";
this.gHeaderColor = "black";
this.gReturnItem = p_item;
}
Calendar.get_month = Calendar_get_month;
Calendar.get_daysofmonth = Calendar_get_daysofmonth;
Calendar.calc_month_year = Calendar_calc_month_year;
Calendar.print = Calendar_print;
[/JAVASCRIPT]
too long to finish...so i jz copy partly...

2
Contributors
1
Reply
3
Views
10 Years
Discussion Span
Last Post by Lafinboy
0

Take the readonly attribute off of the text input. This will allow your users to type in the text field. You will need to add extra validation to that field to ensure the data they enter is in a valid date format.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.