Monotone-Parent: b71cb031b6d81c362bbb5a411baf4cd30bcf1b01

Monotone-Revision: f0e01017c45580ffb00a3ec0ea376689e815bd26

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-11-07T16:13:03
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-11-07 16:13:03 +00:00
parent 53d90d404c
commit 0885f51b6f
10 changed files with 221 additions and 25 deletions

View File

@@ -16,16 +16,17 @@ HTMLInputElement.prototype.assignReplica = function(otherInput) {
}
HTMLInputElement.prototype.valueAsDate = function () {
var newDate;
var date = this.value.split("/");
if (date.length == 3)
newDate = new Date(date[2], date[1] - 1, date[0]);
else {
date = this.value.split("-");
newDate = new Date(date[0], date[1] - 1, date[2]);
}
return this.value.asDate();
}
return newDate;
HTMLInputElement.prototype.setValueAsDate = function(dateValue) {
if (!this.dateSeparator)
this._detectDateSeparator();
this.value = dateValue.stringWithSeparator(this.dateSeparator);
}
HTMLInputElement.prototype.updateShadowValue = function () {
this.setAttribute("shadow-value", this.value);
}
HTMLInputElement.prototype._detectDateSeparator = function() {
@@ -68,3 +69,7 @@ HTMLSelectElement.prototype.assignReplica = function(otherSelect) {
}
this.replica = otherSelect;
}
HTMLSelectElement.prototype.updateShadowValue = function () {
this.setAttribute("shadow-value", this.value);
}