From 2606b91b9f25799fc652aa1eba9dd6bcc32cfcbd Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 14 Sep 2006 00:47:58 +0000 Subject: Make it easier to customise the look of the date picker using CssClass property. --- framework/Web/Javascripts/js/debug/datepicker.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'framework/Web/Javascripts/js/debug') diff --git a/framework/Web/Javascripts/js/debug/datepicker.js b/framework/Web/Javascripts/js/debug/datepicker.js index 0e21b2da..81daeddf 100644 --- a/framework/Web/Javascripts/js/debug/datepicker.js +++ b/framework/Web/Javascripts/js/debug/datepicker.js @@ -53,7 +53,9 @@ Prado.WebUI.TDatePicker.prototype = FirstDayOfWeek : 1, // 0 for sunday - ClassName : "TDatePicker", + ClassName : "", + + CalendarStyle : "default", FromYear : 2000, UpToYear: 2015, @@ -97,7 +99,7 @@ Prado.WebUI.TDatePicker.prototype = // Create the top-level div element this._calDiv = document.createElement("div"); - this._calDiv.className = this.ClassName; + this._calDiv.className = "TDatePicker_"+this.CalendarStyle+" "+this.ClassName; this._calDiv.style.display = "none"; this._calDiv.style.position = "absolute" @@ -581,7 +583,7 @@ Prado.WebUI.TDatePicker.prototype = var within = false; do { - within = within || el.className == this.ClassName; + within = within || (el.className && Element.hasClassName(el, "TDatePicker_"+this.CalendarStyle)); within = within || el == this.trigger; within = within || el == this.control; if(within) break; -- cgit v1.2.3