944,051 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 4017
  • ASP RSS
Jul 13th, 2006
0

DOB field-how to use text field and pop out calendar same time?

Expand Post »
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...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
felicekiew is offline Offline
1 posts
since Jul 2006
Jul 14th, 2006
0

Re: DOB field-how to use text field and pop out calendar same time?

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.
Reputation Points: 16
Solved Threads: 7
Junior Poster
Lafinboy is offline Offline
166 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Problem in COM for ASP in windows 2003
Next Thread in ASP Forum Timeline: stock control guys





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC