@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.

Fix start in fancy datepicker calendar

Summary:
Fixes T9675.
Fixes the calculation for the difference between the first day of the month and the first day of the week. It was previously possible for this to be negative, which caused the subsequent loop to hang the browser.

Test Plan:
- Set week to start on Sunday. Observed that the calendar still renders fine.
- Set week to start on Monday. Observed that the browser no longer hangs on November 2015.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T9675

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

authored by

Dmitri Iouchtchenko and committed by
epriestley
9366edf2 6a035d97

+11 -11
+9 -9
resources/celerity/map.php
··· 453 453 'rsrc/js/core/behavior-device.js' => 'a205cf28', 454 454 'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '6d49590e', 455 455 'rsrc/js/core/behavior-error-log.js' => '6882e80a', 456 - 'rsrc/js/core/behavior-fancy-datepicker.js' => '665cf6ac', 456 + 'rsrc/js/core/behavior-fancy-datepicker.js' => '8ae55229', 457 457 'rsrc/js/core/behavior-file-tree.js' => '88236f00', 458 458 'rsrc/js/core/behavior-form.js' => '5c54cbf3', 459 459 'rsrc/js/core/behavior-gesture.js' => '3ab51e2c', ··· 586 586 'javelin-behavior-durable-column' => 'c72aa091', 587 587 'javelin-behavior-error-log' => '6882e80a', 588 588 'javelin-behavior-event-all-day' => '38dcf3c8', 589 - 'javelin-behavior-fancy-datepicker' => '665cf6ac', 589 + 'javelin-behavior-fancy-datepicker' => '8ae55229', 590 590 'javelin-behavior-global-drag-and-drop' => 'c8e57404', 591 591 'javelin-behavior-herald-rule-editor' => '7ebaeed3', 592 592 'javelin-behavior-high-security-warning' => 'a464fe03', ··· 1294 1294 'javelin-vector', 1295 1295 'differential-inline-comment-editor', 1296 1296 ), 1297 - '665cf6ac' => array( 1298 - 'javelin-behavior', 1299 - 'javelin-util', 1300 - 'javelin-dom', 1301 - 'javelin-stratcom', 1302 - 'javelin-vector', 1303 - ), 1304 1297 '6882e80a' => array( 1305 1298 'javelin-dom', 1306 1299 ), ··· 1499 1492 '8a41885b' => array( 1500 1493 'javelin-install', 1501 1494 'javelin-dom', 1495 + ), 1496 + '8ae55229' => array( 1497 + 'javelin-behavior', 1498 + 'javelin-util', 1499 + 'javelin-dom', 1500 + 'javelin-stratcom', 1501 + 'javelin-vector', 1502 1502 ), 1503 1503 '8b3fd187' => array( 1504 1504 'javelin-install',
+2 -2
webroot/rsrc/js/core/behavior-fancy-datepicker.js
··· 300 300 // Render the calendar itself. NOTE: Javascript uses 0-based month indexes 301 301 // while we use 1-based month indexes, so we have to adjust for that. 302 302 var days = []; 303 - var start = new Date( 303 + var start = (new Date( 304 304 valid_date.getYear() + 1900, 305 305 valid_date.getMonth(), 306 - 1).getDay() - week_start; 306 + 1).getDay() - week_start + 7) % 7; 307 307 308 308 while (start--) { 309 309 days.push(cell('', null, false, 'day-placeholder'));