Page MenuHomePhabricator

D13018.id.diff
No OneTemporary

D13018.id.diff

diff --git a/webroot/rsrc/js/core/behavior-fancy-datepicker.js b/webroot/rsrc/js/core/behavior-fancy-datepicker.js
--- a/webroot/rsrc/js/core/behavior-fancy-datepicker.js
+++ b/webroot/rsrc/js/core/behavior-fancy-datepicker.js
@@ -64,7 +64,9 @@
JX.DOM.remove(picker);
picker = null;
JX.DOM.alterClass(root, 'picker-open', false);
- e.kill();
+ if (e) {
+ e.kill();
+ }
root = null;
};
@@ -167,6 +169,11 @@
if (isNaN(written_date.getTime())) {
return new Date();
} else {
+ //year 01 should be 2001, not 1901
+ if (written_date.getYear() < 70) {
+ value_y += 2000;
+ written_date = new Date(value_y, value_m-1, value_d);
+ }
return written_date;
}
}
@@ -254,6 +261,11 @@
return;
}
+ var valid_date = getValidDate();
+ value_y = valid_date.getYear() + 1900;
+ value_m = valid_date.getMonth() + 1;
+ value_d = valid_date.getDate();
+
var p = data.value.split(':');
switch (p[0]) {
case 'm':

File Metadata

Mime Type
text/plain
Expires
Oct 15 2024, 9:45 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712422
Default Alt Text
D13018.id.diff (1 KB)

Event Timeline