@anguless/angulux 22.3.0 → 22.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2305,21 +2305,35 @@ class DatePicker extends BaseInput {
|
|
|
2305
2305
|
}
|
|
2306
2306
|
switch (true // intentional fall through
|
|
2307
2307
|
) {
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
case isMinDate &&
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
case isMinDate && !minHoursExceeds12 &&
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2308
|
+
// TWO BRANCHES REMOVED HERE, both of which assigned a hard-coded 11.
|
|
2309
|
+
//
|
|
2310
|
+
// They read:
|
|
2311
|
+
//
|
|
2312
|
+
// case isMinDate && minHoursExceeds12 && minDate.getHours() === 12
|
|
2313
|
+
// && minDate.getHours() > convertedHour:
|
|
2314
|
+
// returnTimeTriple[0] = 11;
|
|
2315
|
+
// case isMinDate && !minHoursExceeds12 && minDate.getHours() - 1 === convertedHour
|
|
2316
|
+
// && minDate.getHours() > convertedHour:
|
|
2317
|
+
// returnTimeTriple[0] = 11;
|
|
2318
|
+
// this.pm = true;
|
|
2319
|
+
//
|
|
2320
|
+
// 11 is neither the minimum nor the hour the user asked for. With minDate and the
|
|
2321
|
+
// value both at 09:00 and one step down, the second branch matched (9 - 1 === 8 and
|
|
2322
|
+
// 9 > 8) and the picker rendered 11 — then updateTime() wrote 11:00 into the bound
|
|
2323
|
+
// model. The application asked for a minimum of 09:00 and received a later time it
|
|
2324
|
+
// never chose, with nothing reported. Measured in e2e/upstream-repro.spec.ts.
|
|
2325
|
+
//
|
|
2326
|
+
// Deleting them is safe because each condition is a STRICT SUBSET of a general
|
|
2327
|
+
// clamp further down, and those clamps already do the right thing:
|
|
2328
|
+
// • the first is subsumed by the minHoursExceeds12 branch below, which converts
|
|
2329
|
+
// properly through setCurrentHourPM() instead of guessing;
|
|
2330
|
+
// • the second is subsumed by the plain "minDate.getHours() > convertedHour"
|
|
2331
|
+
// branch, which assigns the minimum itself.
|
|
2332
|
+
// The minute and second lines they fell through into are repeated verbatim in both
|
|
2333
|
+
// of those groups, so minute and second clamping is unchanged.
|
|
2334
|
+
//
|
|
2335
|
+
// this.pm = true was wrong on its own terms as well: that branch only ran when the
|
|
2336
|
+
// minimum was BEFORE noon.
|
|
2323
2337
|
case isMinDate && minHoursExceeds12 && this.minDate.getHours() > convertedHour && convertedHour !== 12:
|
|
2324
2338
|
this.setCurrentHourPM(this.minDate.getHours());
|
|
2325
2339
|
returnTimeTriple[0] = this.currentHour || 0;
|