Error with Date Picker in Web EPG

Topics: Web-Interface
Nov 13, 2011 at 5:24 AM

you need to update the TVGuide.js to be as follows, then the date picker works correctl

function UpdateDatepicker() {

	 try {
		var hiddenfielddate = $('input[id$=HiddenFieldDate]:first');
		 //associate a datepicker with the hidden field
		hiddenfielddate.datepicker(
		  {
		  	dateFormat: 'yy-mm-dd',
		  	buttonImage: 'style/images/TVGuide/Calendar.gif',
		  	buttonImageOnly: true,
		  	showOn: 'both',
		  	showAnim: 'slideDown',
		  	duration: 'slow',
		  	onSelect: function (dateText, inst) {
		  		try {
		  			var lblDate = $('span[id$=lblDate]:first');
		  			lblDate.html(dateText);
		  			__doPostBack(hiddenfielddate.attr('id'), '');
		  		} catch (e) {
		  			alert(e);
		  		}
		  	}
		  });

		  //localize datepicker
		  if ($.datepicker.regional[lang] != undefined)
				hiddenfielddate.datepicker('option', $.datepicker.regional[lang]);
		  else
				hiddenfielddate.datepicker('option', $.datepicker.regional['']);

		  if (datepickerButtonText[lang] != undefined)
				hiddenfielddate.datepicker('option', 'buttonText', datepickerButtonText[lang]);
		  else
				hiddenfielddate.datepicker('option', 'buttonText', datepickerButtonText['']);


		  // show the datepicker when the user clicks on the date label
		  $('span[id$=lblDate]:first').click(function () {
				hiddenfielddate.datepicker('show');
		  });

	 }
	 catch (e) {
		  alert(e);
	 }
}

Nov 27, 2011 at 8:28 AM

What was wrong with it? Seemed to work OK for me....