Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14089885
D21673.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
D21673.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
@@ -481,7 +481,7 @@
'rsrc/js/core/behavior-detect-timezone.js' => '78bc5d94',
'rsrc/js/core/behavior-device.js' => 'ac2b1e01',
'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5',
- 'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb',
+ 'rsrc/js/core/behavior-fancy-datepicker.js' => '36821f8d',
'rsrc/js/core/behavior-form.js' => '55d7b788',
'rsrc/js/core/behavior-gesture.js' => 'b58d1a2a',
'rsrc/js/core/behavior-global-drag-and-drop.js' => '1cab0e9a',
@@ -635,7 +635,7 @@
'javelin-behavior-editengine-reorder-configs' => '4842f137',
'javelin-behavior-editengine-reorder-fields' => '0ad8d31f',
'javelin-behavior-event-all-day' => '0b1bc990',
- 'javelin-behavior-fancy-datepicker' => '956f3eeb',
+ 'javelin-behavior-fancy-datepicker' => '36821f8d',
'javelin-behavior-global-drag-and-drop' => '1cab0e9a',
'javelin-behavior-harbormaster-log' => 'b347a301',
'javelin-behavior-herald-rule-editor' => '0922e81d',
@@ -1229,6 +1229,13 @@
'aphront-typeahead-control-css',
'phui-tag-view-css',
),
+ '36821f8d' => array(
+ 'javelin-behavior',
+ 'javelin-util',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ ),
'3829a3cf' => array(
'javelin-behavior',
'javelin-uri',
@@ -1781,13 +1788,6 @@
'javelin-vector',
'javelin-stratcom',
),
- '956f3eeb' => array(
- 'javelin-behavior',
- 'javelin-util',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-vector',
- ),
'9623adc1' => array(
'javelin-behavior',
'javelin-stratcom',
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
@@ -424,6 +424,13 @@
value_m += 12;
value_y--;
}
+ // This relies on months greater than 11 rolling over into the next
+ // year and days less than 1 rolling back into the previous month.
+ var last_date = new Date(value_y, value_m, 0);
+ if (value_d > last_date.getDate()) {
+ // The date falls outside the new month, so stuff it back in.
+ value_d = last_date.getDate();
+ }
break;
case 'd':
// User clicked a day.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 2:19 PM (20 h, 28 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6786085
Default Alt Text
D21673.diff (2 KB)
Attached To
Mode
D21673: Saturate day of month in datepicker
Attached
Detach File
Event Timeline
Log In to Comment