diff options
author | xue <> | 2007-06-25 18:20:18 +0000 |
---|---|---|
committer | xue <> | 2007-06-25 18:20:18 +0000 |
commit | c4b96269e8b1a129612d813c25cf67e98b9dbc65 (patch) | |
tree | 759016557bfcb292af4ba7fff18b056a0294f946 | |
parent | db685ed372f5aba3130f8b51df440d802dd2233b (diff) |
Fixed #635.
-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")
|