mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-02 21:56:23 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user