summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/datepicker
diff options
context:
space:
mode:
authorxue <>2006-05-29 03:08:07 +0000
committerxue <>2006-05-29 03:08:07 +0000
commit2ea02214b2fb6bedb58dbbd318ef171a9e146524 (patch)
tree16b12d9f68986fe204900d1cee4914a0a4035a7b /framework/Web/Javascripts/datepicker
parent8c1edb7f4eced999c9704ec9ff7ba11d88248bbd (diff)
Merge from 3.0 branch till 1099.
Diffstat (limited to 'framework/Web/Javascripts/datepicker')
-rw-r--r--framework/Web/Javascripts/datepicker/datepicker.js29
-rw-r--r--framework/Web/Javascripts/datepicker/default.css25
-rwxr-xr-xframework/Web/Javascripts/datepicker/spacer.gifbin0 -> 43 bytes
3 files changed, 38 insertions, 16 deletions
diff --git a/framework/Web/Javascripts/datepicker/datepicker.js b/framework/Web/Javascripts/datepicker/datepicker.js
index 79763811..d5d9496c 100644
--- a/framework/Web/Javascripts/datepicker/datepicker.js
+++ b/framework/Web/Javascripts/datepicker/datepicker.js
@@ -81,11 +81,14 @@ Prado.WebUI.TDatePicker.prototype =
Object.extend(this,options);
Event.observe(this.trigger, triggerEvent, this.show.bindEvent(this));
- this.create();
+
},
create : function()
{
+ if(typeof(this._calDiv) != "undefined")
+ return;
+
var div;
var table;
var tbody;
@@ -115,9 +118,10 @@ Prado.WebUI.TDatePicker.prototype =
// Previous Month Button
td = document.createElement("td");
- var previousMonth = document.createElement("button");
- previousMonth.className = "prevMonthButton";
- previousMonth.appendChild(document.createTextNode("<<"));
+ var previousMonth = document.createElement("input");
+ previousMonth.className = "prevMonthButton button";
+ previousMonth.type = "button"
+ previousMonth.value = "<<";
td.appendChild(previousMonth);
tr.appendChild(td);
@@ -162,9 +166,10 @@ Prado.WebUI.TDatePicker.prototype =
td = document.createElement("td");
- td.className = "nextMonthButton";
- var nextMonth = document.createElement("button");
- nextMonth.appendChild(document.createTextNode(">>"));
+ var nextMonth = document.createElement("input");
+ nextMonth.className = "nextMonthButton button";
+ nextMonth.type = "button";
+ nextMonth.value = ">>";
td.appendChild(nextMonth);
tr.appendChild(td);
@@ -178,6 +183,7 @@ Prado.WebUI.TDatePicker.prototype =
var text;
table = document.createElement("table");
+ table.align="center";
table.className = "grid";
div.appendChild(table);
@@ -226,11 +232,12 @@ Prado.WebUI.TDatePicker.prototype =
div.className = "calendarFooter";
this._calDiv.appendChild(div);
- var todayButton = document.createElement("button");
+ var todayButton = document.createElement("input");
+ todayButton.type="button";
todayButton.className = "todayButton";
var today = this.newDate();
var buttonText = today.SimpleFormat(this.Format,this);
- todayButton.appendChild(document.createTextNode(buttonText));
+ todayButton.value = buttonText;
div.appendChild(todayButton);
/*var clearButton = document.createElement("button");
@@ -243,7 +250,7 @@ Prado.WebUI.TDatePicker.prototype =
if(Prado.Browser().ie)
{
this.iePopUp = document.createElement('iframe');
- this.iePopUp.src = "";
+ this.iePopUp.src = Prado.WebUI.TDatePicker.spacer;
this.iePopUp.style.position = "absolute"
this.iePopUp.scrolling="no"
this.iePopUp.frameBorder="0"
@@ -521,6 +528,8 @@ Prado.WebUI.TDatePicker.prototype =
show : function()
{
+ this.create();
+
if(!this.showing)
{
var pos = Position.cumulativeOffset(this.control);
diff --git a/framework/Web/Javascripts/datepicker/default.css b/framework/Web/Javascripts/datepicker/default.css
index e5d327e1..7e920f1b 100644
--- a/framework/Web/Javascripts/datepicker/default.css
+++ b/framework/Web/Javascripts/datepicker/default.css
@@ -21,6 +21,7 @@
margin-left: 1px;
}
+
.TDatePickerImageButton:hover
{
border-color: #ddd;
@@ -31,9 +32,9 @@
font-size: 11px;
}
-.TDatePicker .calendarHeader button
+.TDatePicker input.button
{
- font-size: 12px;
+ font-size: 11px;
width: 32px;
}
@@ -41,6 +42,7 @@
{
padding: 4px 0;
border: 1px solid white;
+ text-align: center;
}
.TDatePicker .hover
{
@@ -61,25 +63,36 @@
{
border: 1px solid white;
cursor: default;
- height: 23px;
+ height: 22px;
}
+
.TDatePicker th
{
width: 28px;
}
+
+.TDatePicker .calendarBody
+{
+ text-align: center;
+ width: 210px;
+ margin: 3px 6px;
+}
+
.TDatePicker .grid
{
border-spacing: 0px;
- margin: 3px;
}
+
.TDatePicker .calendarFooter
{
margin: 2px;
border-top: 1px solid #919EA9;
padding-top: 2px;
}
-.TDatePicker .calendarFooter button
+.TDatePicker .todayButton
{
- font-size: 12px;
+ font-size: 11px;
margin: 4px;
+ padding-left: 1em;
+ padding-right: 1em;
} \ No newline at end of file
diff --git a/framework/Web/Javascripts/datepicker/spacer.gif b/framework/Web/Javascripts/datepicker/spacer.gif
new file mode 100755
index 00000000..fc256098
--- /dev/null
+++ b/framework/Web/Javascripts/datepicker/spacer.gif
Binary files differ