Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14050764
D15727.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15727.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -479,7 +479,7 @@
'rsrc/js/core/behavior-device.js' => 'b5b36110',
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '4f6a4b4e',
'rsrc/js/core/behavior-error-log.js' => '6882e80a',
- 'rsrc/js/core/behavior-fancy-datepicker.js' => '8ae55229',
+ 'rsrc/js/core/behavior-fancy-datepicker.js' => '568931f3',
'rsrc/js/core/behavior-file-tree.js' => '88236f00',
'rsrc/js/core/behavior-form.js' => '5c54cbf3',
'rsrc/js/core/behavior-gesture.js' => '3ab51e2c',
@@ -622,7 +622,7 @@
'javelin-behavior-editengine-reorder-fields' => 'b59e1e96',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-event-all-day' => '38dcf3c8',
- 'javelin-behavior-fancy-datepicker' => '8ae55229',
+ 'javelin-behavior-fancy-datepicker' => '568931f3',
'javelin-behavior-global-drag-and-drop' => 'c8e57404',
'javelin-behavior-herald-rule-editor' => '7ebaeed3',
'javelin-behavior-high-security-warning' => 'a464fe03',
@@ -1301,6 +1301,13 @@
'phabricator-drag-and-drop-file-upload',
'javelin-workboard-board',
),
+ '568931f3' => array(
+ 'javelin-behavior',
+ 'javelin-util',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ ),
'56a1ca03' => array(
'javelin-behavior',
'javelin-behavior-device',
@@ -1554,13 +1561,6 @@
'javelin-install',
'javelin-dom',
),
- '8ae55229' => array(
- 'javelin-behavior',
- 'javelin-util',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-vector',
- ),
'8bdb2835' => array(
'phui-fontkit-css',
),
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
@@ -264,6 +264,7 @@
function getValidDate() {
var written_date = new Date(value_y, value_m-1, value_d);
+
if (isNaN(written_date.getTime())) {
return new Date();
} else {
@@ -272,6 +273,14 @@
value_y += 2000;
written_date = new Date(value_y, value_m-1, value_d);
}
+
+ // adjust for a date like February 31
+ var adjust = 1;
+ while (written_date.getMonth() !== value_m-1) {
+ written_date = new Date(value_y, value_m-1, value_d-adjust);
+ adjust++;
+ }
+
return written_date;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 15, 8:32 PM (3 d, 12 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6723307
Default Alt Text
D15727.diff (2 KB)
Attached To
Mode
D15727: When scrolling forward a month in calendar date picker from 1/31, next chosen date should be 2/29, not 3/1.
Attached
Detach File
Event Timeline
Log In to Comment