diff options
author | ctrlaltca@gmail.com <> | 2011-10-11 12:56:12 +0000 |
---|---|---|
committer | ctrlaltca@gmail.com <> | 2011-10-11 12:56:12 +0000 |
commit | 70c50522f40aab715d6efb7a875b2b85bb31c101 (patch) | |
tree | a572c2e21ac7a8da166fbb098b5be60d54329897 /framework/Web | |
parent | 1b237f5c0a50fc3e986ec52fa6771eec0c7c351c (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.js | 7 |
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
|