summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-10-11 12:56:12 +0000
committerctrlaltca@gmail.com <>2011-10-11 12:56:12 +0000
commit70c50522f40aab715d6efb7a875b2b85bb31c101 (patch)
treea572c2e21ac7a8da166fbb098b5be60d54329897 /framework/Web
parent1b237f5c0a50fc3e986ec52fa6771eec0c7c351c (diff)
fix for a TDatePicker bug reported on the forum by ClaCS (default date doesn't consider FromYear and UpToYear values)
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/source/prado/datepicker/datepicker.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js
index 3ee9e28f..781ff36a 100644
--- a/framework/Web/Javascripts/source/prado/datepicker/datepicker.js
+++ b/framework/Web/Javascripts/source/prado/datepicker/datepicker.js
@@ -57,7 +57,7 @@ Prado.WebUI.TDatePicker.prototype =
CalendarStyle : "default",
- FromYear : 2000, UpToYear: 2015,
+ FromYear : 2005, UpToYear: 2020,
initialize : function(options)
{
@@ -66,7 +66,6 @@ Prado.WebUI.TDatePicker.prototype =
this.dateSlot = new Array(42);
this.weekSlot = new Array(6);
this.minimalDaysInFirstWeek = 4;
- this.selectedDate = this.newDate();
this.positionMode = 'Bottom';
Prado.Registry.set(options.ID, this);
@@ -90,7 +89,9 @@ Prado.WebUI.TDatePicker.prototype =
}
Object.extend(this,options);
-
+ // generate default date _after_ extending options
+ this.selectedDate = this.newDate();
+
Event.observe(this.trigger, triggerEvent, this.show.bindEvent(this));
// Listen to change event if needed