summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/datepicker
diff options
context:
space:
mode:
authorwei <>2006-06-09 07:41:18 +0000
committerwei <>2006-06-09 07:41:18 +0000
commitc3404ca887eb20dbf7e3b8d4118d87f4cf39f31e (patch)
tree7aad322f619578b09445509760acb43cf5a70bab /framework/Web/Javascripts/datepicker
parente95d096064de94c948e4398f5183afaccf522ffa (diff)
Update datepicker and link button.
Diffstat (limited to 'framework/Web/Javascripts/datepicker')
-rw-r--r--framework/Web/Javascripts/datepicker/datepicker.js28
1 files changed, 11 insertions, 17 deletions
diff --git a/framework/Web/Javascripts/datepicker/datepicker.js b/framework/Web/Javascripts/datepicker/datepicker.js
index e704e950..11bee07e 100644
--- a/framework/Web/Javascripts/datepicker/datepicker.js
+++ b/framework/Web/Javascripts/datepicker/datepicker.js
@@ -239,13 +239,6 @@ Prado.WebUI.TDatePicker.prototype =
var buttonText = today.SimpleFormat(this.Format,this);
todayButton.value = buttonText;
div.appendChild(todayButton);
-
- /*var clearButton = document.createElement("button");
- clearButton.className = "clearButton";
- buttonText = "Clear";
- clearButton.appendChild(document.createTextNode(buttonText));
- div.appendChild(clearButton);
- */
if(Prado.Browser().ie)
{
@@ -283,10 +276,9 @@ Prado.WebUI.TDatePicker.prototype =
Event.observe(calendarBody, "click", this.selectDate.bindEvent(this));
- Event.observe(this.control, "blur", this.hide.bind(this));
Prado.Element.focus(this.control);
- },A
+ },
ieHack : function(cleanup)
{
@@ -308,7 +300,7 @@ Prado.WebUI.TDatePicker.prototype =
if (!ev) ev = document.parentWindow.event;
var kc = ev.keyCode != null ? ev.keyCode : ev.charCode;
- if(kc == Event.KEY_RETURN || kc == Event.KEY_SPACEBAR)
+ if(kc == Event.KEY_RETURN || kc == Event.KEY_SPACEBAR || kc == Event.KEY_TAB)
{
this.setSelectedDate(this.selectedDate);
Event.stop(ev);
@@ -318,8 +310,7 @@ Prado.WebUI.TDatePicker.prototype =
{
Event.stop(ev); this.hide();
}
-
-
+
var getDaysPerMonth = function (nMonth, nYear)
{
nMonth = (nMonth + 12) % 12;
@@ -600,6 +591,7 @@ Prado.WebUI.TDatePicker.prototype =
if(!within) this.hide();
},
+
hide : function()
{
if(this.showing)
@@ -667,11 +659,13 @@ Prado.WebUI.TDatePicker.prototype =
hover : function(ev)
{
- //conditionally add the hover class to the event target element.
- if(ev.type == "mouseover")
- Event.element(ev).addClassName("hover");
- else
- Event.element(ev).removeClassName("hover");
+ if(Event.element(ev).tagName)
+ {
+ if(ev.type == "mouseover")
+ Event.element(ev).addClassName("hover");
+ else
+ Event.element(ev).removeClassName("hover");
+ }
},
updateHeader : function () {