add: var hoursSelect = jQuery("<select>").attr("class","hours").width("3em").change(function(e) {jQuery.datePicker.updatetheInput(this);return false;}); for (var i = 0; i<24; i++){ hoursSelect.append(jQuery("<option>").html(_zeroPad(i))); } var minutesSelect = jQuery("<select>").attr("class","minutes").width("3em").change(function(e) {jQuery.datePicker.updatetheInput(this);return false;}); var secondsSelect = jQuery("<select>").attr("class","seconds").width("3em").change(function(e) {jQuery.datePicker.updatetheInput(this);return false;}); for (var i = 0; i<60; i++){ minutesSelect.append(jQuery("<option>").html(_zeroPad(i))); secondsSelect.append(jQuery("<option>").html(_zeroPad(i))); }   var timeRow = jQuery("<p>").append(jQuery("<strong>").html("Time: ")).append(hoursSelect).append(minutesSelect).append(secondsSelect); 
context: 	var _getCalendarDiv = function(dIn)	{		var today = new Date();		if (dIn == undefined) {			// start from this month.			d = new Date(today.getFullYear(), today.getMonth(), 1);		} else {			// start from the passed in date			d = dIn;			d.setDate(1);		}		// check that date is within allowed limits:		if ((d.getMonth() < _firstDate.getMonth() && d.getFullYear() == _firstDate.getFullYear()) || d.getFullYear() < _firstDate.getFullYear()) {			d = new Date(_firstDate.getFullYear(), _firstDate.getMonth(), 1);;		} else if ((d.getMonth() > _lastDate.getMonth() && d.getFullYear() == _lastDate.getFullYear()) || d.getFullYear() > _lastDate.getFullYear()) {			d = new Date(_lastDate.getFullYear(), _lastDate.getMonth(), 1);;		}		var jCalDiv = jQuery("<div>").attr('class','popup-calendar');		var firstMonth = true;		var firstDate = _firstDate.getDate();		// create prev and next links		var prevLinkDiv = '';		if (!(d.getMonth() == _firstDate.getMonth() && d.getFullYear() == _firstDate.getFullYear())) {			// not in first display month so show a previous link			firstMonth = false;			var lastMonth = new Date(d.getFullYear(), d.getMonth()-1, 1);			var prevLink = jQuery("<a>").href('javascript:;').html(navLinks.p).click(function()			{				jQuery.datePicker.changeMonth(lastMonth, this);				return false;			});			prevLinkDiv = jQuery("<div>").attr('class','link-prev').html('&lt;').append(prevLink);		}		var finalMonth = true;		var lastDate = _lastDate.getDate();		nextLinkDiv = '';		if (!(d.getMonth() == _lastDate.getMonth() && d.getFullYear() == _lastDate.getFullYear())) {			// in the last month - no next link			finalMonth = false;			var nextMonth = new Date(d.getFullYear(), d.getMonth()+1, 1);			var nextLink = jQuery("<a>").href('javascript:;').html(navLinks.n).click(function()			{				jQuery.datePicker.changeMonth(nextMonth, this);				return false;			});			nextLinkDiv = jQuery("<div>").attr('class','link-next').html('&gt;').prepend(nextLink);		}		var closeLink = jQuery("<a>").attr('href','javascript:;').html(navLinks.c).click(function()		{			jQuery.datePicker.closeCalendar();		});		jCalDiv.append(			jQuery("<div>").attr('class', 'link-close').append(closeLink),			jQuery("<h3>").html(months[d.getMonth()] + ' ' + d.getFullYear())		);		var headRow = jQuery("<tr>");		for (var i=_firstDayOfWeek; i<_firstDayOfWeek+7; i++) {			var weekday = i%7;			var day = days[weekday];			headRow.append(				jQuery("<th>").attr({'scope':'col', 'abbr':day, 'title':day, 'class':(weekday == 0 || weekday == 6 ? 'weekend' : 'weekday')}).html(day.substr(0, 1))			);		}		var tBody = jQuery("<tbody>");		var lastDay = (new Date(d.getFullYear(), d.getMonth()+1, 0)).getDate();		var curDay = _firstDayOfWeek - d.getDay();		if (curDay > 0) curDay -= 7;		var todayDate = (new Date()).getDate();		var thisMonth = d.getMonth() == today.getMonth() && d.getFullYear() == today.getFullYear();		var w = 0;		while (w++<6) {			var thisRow = jQuery("<tr>");			for (var i=0; i<7; i++) {				var weekday = (_firstDayOfWeek + i) % 7;				var atts = {'class':(weekday == 0 || weekday == 6 ? 'weekend ' : 'weekday ')};				if (curDay < 0 || curDay >= lastDay) {					dayStr = ' ';				} else if (firstMonth && curDay < firstDate-1) {					dayStr = curDay+1;					atts['class'] += 'inactive';				} else if (finalMonth && curDay > lastDate-1) {					dayStr = curDay+1;					atts['class'] += 'inactive';				} else {					d.setDate(curDay+1);					var dStr = _dateToStr(d);					dayStr = jQuery("<a>").attr({'href':'javascript:;', 'rel':dStr}).html(curDay+1).click(function(e)					{						jQuery.datePicker.selectDate(jQuery.attr(this, 'rel'), this);						return false;					})[0];					if (_selectedDate && _selectedDate==dStr) {						jQuery(dayStr).attr('class','selected');					}				}				if (thisMonth && curDay+1 == todayDate) {					atts['class'] += 'today';				}				thisRow.append(jQuery("<td>").attr(atts).append(dayStr));				curDay++;			}			tBody.append(thisRow);		}		jCalDiv.append(			jQuery("<table>").attr('cellspacing',2).append("<thead>")			.find("thead").append(headRow).parent().append(tBody.children())		).append(prevLinkDiv).append(nextLinkDiv);		if (jQuery.browser.msie) {			// we put a styled iframe behind the calendar so HTML SELECT elements don't show through			var iframe = [	'<iframe class="bgiframe" tabindex="-1" ',		 					'style="display:block; position:absolute;',							'top: 0;',							'left:0;',							'z-index:-1; filter:Alpha(Opacity=\'0\');',							'width:3000px;',							'height:3000px"/>'].join('');			jCalDiv.append(document.createElement(iframe));		}		jCalDiv.css({'display':'block'});		return jCalDiv[0];	};
meta: 37	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/37/6dd8234d010488a02a9ed969babec2cd61277658/datePicker.js/clean/webapp/js/datePicker.js