@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Saturate day of month in datepicker

Summary:
The datepicker could step by the wrong number of months, due to the date rolling over to the next month when the number of days in the month is exceeded. For example, going forward from January 31 would jump to March 3, while going backward from July 31 would only go to July 1.

Push the date back to ensure that the datepicker stays in the correct month when switching.

Test Plan: Changed months starting from an assortment of dates.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: artms, Korvin

Differential Revision: https://secure.phabricator.com/D21673

+16 -9
+9 -9
resources/celerity/map.php
··· 481 481 'rsrc/js/core/behavior-detect-timezone.js' => '78bc5d94', 482 482 'rsrc/js/core/behavior-device.js' => 'ac2b1e01', 483 483 'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '7ad020a5', 484 - 'rsrc/js/core/behavior-fancy-datepicker.js' => '956f3eeb', 484 + 'rsrc/js/core/behavior-fancy-datepicker.js' => '36821f8d', 485 485 'rsrc/js/core/behavior-form.js' => '55d7b788', 486 486 'rsrc/js/core/behavior-gesture.js' => 'b58d1a2a', 487 487 'rsrc/js/core/behavior-global-drag-and-drop.js' => '1cab0e9a', ··· 635 635 'javelin-behavior-editengine-reorder-configs' => '4842f137', 636 636 'javelin-behavior-editengine-reorder-fields' => '0ad8d31f', 637 637 'javelin-behavior-event-all-day' => '0b1bc990', 638 - 'javelin-behavior-fancy-datepicker' => '956f3eeb', 638 + 'javelin-behavior-fancy-datepicker' => '36821f8d', 639 639 'javelin-behavior-global-drag-and-drop' => '1cab0e9a', 640 640 'javelin-behavior-harbormaster-log' => 'b347a301', 641 641 'javelin-behavior-herald-rule-editor' => '0922e81d', ··· 1229 1229 'aphront-typeahead-control-css', 1230 1230 'phui-tag-view-css', 1231 1231 ), 1232 + '36821f8d' => array( 1233 + 'javelin-behavior', 1234 + 'javelin-util', 1235 + 'javelin-dom', 1236 + 'javelin-stratcom', 1237 + 'javelin-vector', 1238 + ), 1232 1239 '3829a3cf' => array( 1233 1240 'javelin-behavior', 1234 1241 'javelin-uri', ··· 1780 1787 'javelin-util', 1781 1788 'javelin-vector', 1782 1789 'javelin-stratcom', 1783 - ), 1784 - '956f3eeb' => array( 1785 - 'javelin-behavior', 1786 - 'javelin-util', 1787 - 'javelin-dom', 1788 - 'javelin-stratcom', 1789 - 'javelin-vector', 1790 1790 ), 1791 1791 '9623adc1' => array( 1792 1792 'javelin-behavior',
+7
webroot/rsrc/js/core/behavior-fancy-datepicker.js
··· 424 424 value_m += 12; 425 425 value_y--; 426 426 } 427 + // This relies on months greater than 11 rolling over into the next 428 + // year and days less than 1 rolling back into the previous month. 429 + var last_date = new Date(value_y, value_m, 0); 430 + if (value_d > last_date.getDate()) { 431 + // The date falls outside the new month, so stuff it back in. 432 + value_d = last_date.getDate(); 433 + } 427 434 break; 428 435 case 'd': 429 436 // User clicked a day.