changeset e687305a3645 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=e687305a3645
description:
Add fallback index to datetimepicker _setValue
issue9615
review324441002
diffstat:
src/sao.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r ff44f5021a50 -r e687305a3645 src/sao.js
--- a/src/sao.js Mon Nov 02 15:39:58 2020 +0100
+++ b/src/sao.js Wed Nov 11 20:34:10 2020 +0100
@@ -1194,5 +1194,12 @@
$.fn.datetimepicker.prototype.constructor.Constructor.prototype._getLastPickedDate
= function _getLastPickedDate() {
return this._dates[this._getLastPickedDateIndex()] ||
this.getMoment();
};
+
+ // XXX: Add fallback index
+ var setValue =
$.fn.datetimepicker.prototype.constructor.Constructor.prototype._setValue;
+
$.fn.datetimepicker.prototype.constructor.Constructor.prototype._setValue =
function _setValue(targetMoment, index) {
+ index = index || 0;
+ return setValue.call(this, targetMoment, index);
+ };
}
}());