diff options
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | framework/Web/Javascripts/source/prado/datepicker/datepicker.js | 11 | 
2 files changed, 12 insertions, 0 deletions
| @@ -8,6 +8,7 @@ BUG: Ticket#652 - OFFSET must be specified together with LIMIT for TScaffoldView  BUG: Ticket#653 - TUrlMapping: ServiceId irgnored in URL-Map (Qiang)  BUG: Ticket#488 - TActiveCustomValidator Is Bypassing My Callback (Wei)  BUG: Ticket#620 - PRADO should not take over all of Prototype's Callbacks (Wei) +BUG: Ticket#635 - TDatePicker not correctly updating month (Christophe)  BUG: TWizard Sidebar using TDataListItemRenderer has error (Qiang)  BUG: TOutputCache crashes when a default button is set (Qiang)  BUG: Fixed several typos in TDbCache (Qiang) diff --git a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js index 262e0c1c..6dddeaad 100644 --- a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js +++ b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js @@ -508,6 +508,7 @@ Prado.WebUI.TDatePicker.prototype =  	setMonth : function (month)
  	{
  		var d = this.newDate(this.selectedDate);
 +		d.setDate(Math.min(d.getDate(), this.getDaysPerMonth(month,d.getFullYear())));
  		d.setMonth(month);
  		this.setSelectedDate(d);
  	},
 @@ -522,6 +523,16 @@ Prado.WebUI.TDatePicker.prototype =  		this.setMonth(this.selectedDate.getMonth()-1);
  	},
 +	getDaysPerMonth : function (month, year)
 +	{
 +		month = (Number(month)+12) % 12;
 +        var days = [31,28,31,30,31,30,31,31,30,31,30,31];
 +		var res = days[month];
 +		if (month == 1 && ((!(year % 4) && (year % 100)) || !(year % 400))) //feburary, leap years has 29
 +            res++;
 +        return res;
 +	},
 +
  	getDatePickerOffsetHeight : function()
  	{
  		if(this.options.InputMode == "TextBox")
 | 
