summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorwei <>2006-01-20 01:25:05 +0000
committerwei <>2006-01-20 01:25:05 +0000
commit63576250311be8d296ee19696280e3e165ce761e (patch)
tree840e86735d3912ff25c721b49971347be42b2bcc /framework
parent05b3992f9e8a1d6174b30d27674e7192098cc0c4 (diff)
Move init of js datepicker to Event.OnLoad to avoid IE error
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/Javascripts/js/datepicker.js8
-rw-r--r--framework/Web/Javascripts/prado/datepicker.js4
-rw-r--r--framework/Web/UI/WebControls/TDatePicker.php2
3 files changed, 11 insertions, 3 deletions
diff --git a/framework/Web/Javascripts/js/datepicker.js b/framework/Web/Javascripts/js/datepicker.js
index d4ba0d2c..e840fc68 100644
--- a/framework/Web/Javascripts/js/datepicker.js
+++ b/framework/Web/Javascripts/js/datepicker.js
@@ -128,6 +128,14 @@ _20.className="clearButton";
_19="Clear";
_20.appendChild(document.createTextNode(_19));
_4.appendChild(_20);
+if(Prado.Browser().ie){
+this.iePopUp=document.createElement("iframe");
+this.iePopUp.src="";
+this.iePopUp.style.position="absolute";
+this.iePopUp.scrolling="no";
+this.iePopUp.frameBorder="0";
+document.body.appendChild(this.iePopUp);
+}
document.body.appendChild(this._calDiv);
this.update();
this.updateHeader();
diff --git a/framework/Web/Javascripts/prado/datepicker.js b/framework/Web/Javascripts/prado/datepicker.js
index 680008bd..f3c6ff27 100644
--- a/framework/Web/Javascripts/prado/datepicker.js
+++ b/framework/Web/Javascripts/prado/datepicker.js
@@ -199,7 +199,7 @@ Prado.WebUI.TDatePicker.prototype =
clearButton.appendChild(document.createTextNode(buttonText));
div.appendChild(clearButton);
-/* if(Prado.Browser().ie)
+ if(Prado.Browser().ie)
{
this.iePopUp = document.createElement('iframe');
this.iePopUp.src = "";
@@ -207,7 +207,7 @@ Prado.WebUI.TDatePicker.prototype =
this.iePopUp.scrolling="no"
this.iePopUp.frameBorder="0"
document.body.appendChild(this.iePopUp);
- }*/
+ }
document.body.appendChild(this._calDiv);
diff --git a/framework/Web/UI/WebControls/TDatePicker.php b/framework/Web/UI/WebControls/TDatePicker.php
index a8fb363e..125b97c3 100644
--- a/framework/Web/UI/WebControls/TDatePicker.php
+++ b/framework/Web/UI/WebControls/TDatePicker.php
@@ -235,7 +235,7 @@ class TDatePicker extends TTextBox
$serializer = new TJavascriptSerializer($this->getDatePickerOptions());
$options = $serializer->toJavascript();
$id = $this->getClientID();
- $code = "new Prado.WebUI.TDatePicker('$id', $options);";
+ $code = "Event.OnLoad(function(){ new Prado.WebUI.TDatePicker('$id', $options); });";
$scripts->registerEndScript("prado:$id", $code);
}
}