rem: setTimeProperties(); updateYearDiv(); updateMonthDiv(); updateHourDiv(); updateMinuteDiv(); updateAMPMDiv();  
add: setTimeout(updateAllProperties,0); 
context: function displayCalendar(inputField,format,buttonObj,displayTime,timeInput){	if(displayTime)calendarDisplayTime=true; else calendarDisplayTime = false;	if(inputField.value.length>0){				if(!format.match(/^[0-9]*?$/gi)){// WICKET CHANGED			var items = inputField.value.split(/[^0-9]/gi);// DONE WICKET CHANGED						var positionArray = new Array();			positionArray['m'] = format.indexOf('mm');			if(positionArray['m']==-1)positionArray['m'] = format.indexOf('m');			positionArray['d'] = format.indexOf('dd');			if(positionArray['d']==-1)positionArray['d'] = format.indexOf('d');			positionArray['y'] = format.indexOf('yyyy');// WICKET ADDED			positionArray['w'] = format.indexOf('ww');			if (positionArray['w']==-1) positionArray['w'] = format.indexOf('w');// DONE WICKET ADDED			positionArray['h'] = format.indexOf('hh');			// WICKET ADDED			if(positionArray['h']==-1)positionArray['h'] = format.indexOf('h');// DONE WICKET ADDED			positionArray['i'] = format.indexOf('ii');// WICKET ADDED			positionArray['a'] = format.indexOf('a');// DONE WICKET ADDED			var positionArrayNumeric = Array();			positionArrayNumeric[0] = positionArray['m'];			positionArrayNumeric[1] = positionArray['d'];			positionArrayNumeric[2] = positionArray['y'];			positionArrayNumeric[3] = positionArray['h'];			positionArrayNumeric[4] = positionArray['i'];			positionArrayNumeric[5] = positionArray['a'];// WICKET ADDED						positionArrayNumeric[6] = positionArray['w'];// DONE WICKET ADDED												positionArrayNumeric = positionArrayNumeric.sort(calendarSortItems);			var itemIndex = -1;			currentHour = '00';			currentMinute = '00';			currentAMPM = false;			for(var no=0;no<positionArrayNumeric.length;no++){				if(positionArrayNumeric[no]==-1)continue;				itemIndex++;				if(positionArrayNumeric[no]==positionArray['m']){					currentMonth = items[itemIndex]-1;					continue;				}				if(positionArrayNumeric[no]==positionArray['y']){					currentYear = items[itemIndex];					continue;				}					if(positionArrayNumeric[no]==positionArray['d']){					tmpDay = items[itemIndex];					continue;				}					if(positionArrayNumeric[no]==positionArray['h']){					currentHour = items[itemIndex];					if (parseInt(currentHour) < 10)					{						currentHour = "0" +parseInt(currentHour); 					}					continue;				}					if(positionArrayNumeric[no]==positionArray['i']){					currentMinute = items[itemIndex];					continue;				}	// WICKET ADDED				if(positionArrayNumeric[no]==positionArray['a']){					if (inputField.value.toLowerCase().indexOf("am") != -1)					{						currentAMPM = "AM";					}					else					{						currentAMPM = "PM";					}					continue;				}	// DONE WICKET ADDED			}			currentMonth = currentMonth / 1;			tmpDay = tmpDay / 1;		}else{					var monthPos = format.indexOf('mm');			currentMonth = inputField.value.substr(monthPos,2)/1 -1;				var yearPos = format.indexOf('yyyy');			currentYear = inputField.value.substr(yearPos,4);					var dayPos = format.indexOf('dd');			tmpDay = inputField.value.substr(dayPos,2);								var hourPos = format.indexOf('hh');			if(hourPos>=0){				tmpHour = inputField.value.substr(hourPos,2);					currentHour = tmpHour;			}else{				currentHour = '00';			}			var minutePos = format.indexOf('ii');			if(minutePos>=0){				tmpMinute = inputField.value.substr(minutePos,2);					currentMinute = tmpMinute;			}else{				currentMinute = '00';			}			}	}else{		var d = new Date();		currentMonth = d.getMonth();		currentYear = d.getFullYear();		currentHour = '08';		currentMinute = '00';		tmpDay = d.getDate();	}		inputYear = currentYear;	inputMonth = currentMonth;	inputDay = tmpDay/1;			if(!calendarDiv){		initCalendar();				}else{		if(calendarDiv.style.display=='block'){			closeCalendar();			return false;		}		writeCalendarContent();	}							returnFormat = format;	returnDateTo = inputField;	positionCalendar(buttonObj);	calendarDiv.style.visibility = 'visible';		calendarDiv.style.display = 'block';		if(iframeObj){		iframeObj.style.display = '';		iframeObj.style.height = '140px';		iframeObj.style.width = '195px';				iframeObj2.style.display = '';		iframeObj2.style.height = '140px';		iframeObj2.style.width = '195px';	}		setTimeProperties();		updateYearDiv();	updateMonthDiv();	updateHourDiv();	updateMinuteDiv();	updateAMPMDiv();	}
meta: 5569	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5569/0ae7c9a868d70fcaba44c68870eb1824310364a3/dhtmlgoodies_calendar.js/buggy/wicket-calendar/src/main/java/org/wicketstuff/calendar/markup/html/form/dhtmlgoodies_calendar.js