Skip to content

Commit d7474ad

Browse files
committed
chore(core): UIDatePicker's wheel rules, measured on iOS 26.2
The date picker domain of the UIKit constants table, each rule sourced: the month/year wheels change the date, keeping the day; the AM/PM column follows the hour; a column that comes to rest past a bound turns back onto it; and a day the month lacks clamps to its last day. The date and time touch sheets follow these rules. Nothing is exported from the package entry point.
1 parent 94d18e1 commit d7474ad

5 files changed

Lines changed: 83 additions & 4 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[chore] Internal: the rules UIDatePicker adds to its wheels, measured on iOS 26.2, join the UIKit constants table: the month/year wheels changing the date, the AM/PM column following the hour, the turn back onto a bound, and the day clamped to the month. Each rule comes with its source. None is exported from the package entry point.
6+
7+
@vjeux

‎packages/core/src/motion/MEASUREMENTS.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ match the probe.
261261
| M-SH21 | SheetProbe on iPad, iOS 27 `preferredPlacement` each case, RTL | present | placement geometry and motion | B, C |
262262
| M-SH22 | SheetProbe iOS 26 `preferredTransition = .zoom` from a bar button | present, dismiss | morph geometry per frame | A, C |
263263

264+
## Date picker (UIDatePicker)
265+
266+
Rules the DateInput, DateTimeInput and TimeInput touch sheets follow, in their
267+
own table (`uikit/datePicker.ts`). The wheels' physics are UIPickerView's: the
268+
table only names them, and their values belong to the wheel's own table.
269+
270+
Done (UIKit lab, iOS 26.2 simulator, Oct 23 2026; in the date picker's table):
271+
the month/year wheels changing the date, the AM/PM column following the hour,
272+
the turn back onto a bound, and the day clamped to the month.
273+
264274
## Context menu (UIContextMenuInteraction)
265275

266276
Values the context menu reads from its own table, which lands with the

‎packages/core/src/motion/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ roles through `resolveMotion`.
2424
| `uikit/gestures.ts` | Gesture recognizer thresholds, the velocity filter and haptic stand-ins, as `{value, unit}` entries (sources in JSDoc). |
2525
| `uikit/picker.ts` | UIPickerView: row pitch, height and rubber band, velocity floor, the coast's stop speed, snap at rest, tap spin, tick. |
2626
| `uikit/switch.ts` | UISwitch on iOS 26.2: geometry, the lift, settle, travel and tracking springs, the flip distance, the track colour. |
27+
| `uikit/datePicker.ts` | UIDatePicker: the rules it adds to its wheels. |
2728
| `roles.ts` | The internal motion roles: the springs, durations and curves `spec:AST-094` FR4 names, registered by the shared tables, and a role's CSS form read back. |
2829
| `roleValue.ts` | A role's CSS form, written: a spring's duration and bounce, a duration in ms, a curve's `cubic-bezier()`. |
2930
| `resolveMotion.ts` | A role's value: its table value, as the per-role tables stay internal (`spec:AST-094` DEC-15). |
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Copyright (c) Meta Platforms, Inc. and affiliates.
2+
3+
/**
4+
* @file datePicker.ts
5+
* @input Nothing; data only
6+
* @output Exports `datePicker`: the rules UIDatePicker adds to its wheels. The
7+
* month/year wheels change the date, the AM/PM column follows the hour, a
8+
* column turns back onto a bound, and a day clamps to its month.
9+
* @position The date picker domain of the UIKit constants table
10+
* (motion/uikit), for the date and time touch sheets. Every leaf names its
11+
* source, which uikit.test.ts checks.
12+
*
13+
* SYNC: When modified, update /packages/core/src/motion/MEASUREMENTS.md and
14+
* /packages/core/src/motion/README.md.
15+
*/
16+
17+
export const datePicker = {
18+
calendar: {
19+
monthYearWheels: {
20+
/**
21+
* Turning the month or year wheel changes the picker's date, keeping
22+
* the day, and fires `valueChanged`.
23+
* @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.inline`,
24+
* October 15 → May 15 after the month wheel's fling, with a
25+
* `valueChanged` carrying May 15, Oct 23 2026
26+
*/
27+
changesDate: true,
28+
},
29+
},
30+
wheels: {
31+
/**
32+
* In 12-hour time the AM/PM column follows the hour. Turning the hour from
33+
* 11 to 12 turns the time from AM to PM, and back. From 12 to 1 it keeps
34+
* the half of the day.
35+
* @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`,
36+
* en_US: 11:58 AM, hour wheel +1 row → `valueChanged` 12:58 PM; then
37+
* the minute wheel's +4 rows carried the hour from 12 to 1 → 1:02 PM,
38+
* Oct 23 2026
39+
*/
40+
meridiemFollowsHour: true,
41+
/**
42+
* A column that comes to rest past `minimumDate` or `maximumDate` turns
43+
* back onto the bound. Its `valueChanged` already carries the bound. For
44+
* example, with bounds 9:00–17:00, the hour of 10:00 dragged to 7 reads
45+
* 9:00 at rest. The hour column then turns 64 pt, two rows, back to 9.
46+
* @source measured: UIKit lab, iOS 26.2 simulator, `.time` `.wheels`
47+
* with bounds 9:00–17:00 and `minuteInterval` 15, per-frame hour
48+
* offsets after the rest (0.4, 2, 7.4, 16, 26.4, 37.7, 48.3, 56.7,
49+
* 62, 64 pt at 33 ms steps) and the `valueChanged` time, Oct 23 2026
50+
*/
51+
restPastBound: 'turnToBound',
52+
/**
53+
* In `.date` wheels a day the month does not have clamps to the month's
54+
* last day (January 30, month +1 → February 28).
55+
* @source measured: UIKit lab, iOS 26.2 simulator, `.date` `.wheels`
56+
* with bounds Jun 1 2026 – Mar 15 2027, Oct 23 2026
57+
*/
58+
dayClampsToMonth: true,
59+
},
60+
} as const;

‎packages/core/src/motion/uikit/index.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* @file index.ts
55
* @input The domain files of the UIKit constants table
66
* @output Re-exports `springs` and one constant per spring (`SHEET_PRESENT_SPRING`,
7-
* …), `scroll`, `timing`, `navigation`, `picker`, `progressBar`, the
8-
* `slider` and switch (`switchControl`) domains, and the gesture thresholds
9-
* (one `UIKIT_*` group per recognizer, their union `UIKIT_GESTURES`, and the
10-
* haptic tables)
7+
* …), `scroll`, `timing`, `navigation`, `picker`, `progressBar`,
8+
* `datePicker`, and the `slider` and switch (`switchControl`) domains. It
9+
* also re-exports the gesture thresholds: one `UIKIT_*` group per recognizer,
10+
* their union `UIKIT_GESTURES`, and the haptic tables
1111
* @position Entry of the UIKit constants table (motion/uikit). Internal to
1212
* core: not exported from the package entry point
1313
*
@@ -39,6 +39,7 @@ export {
3939
type GestureConstantUnit,
4040
type HapticFeedbackKind,
4141
} from './gestures';
42+
export {datePicker} from './datePicker';
4243
export {navigation, registerNavigationTable} from './navigation';
4344
export {picker} from './picker';
4445
export {progressBar, registerProgressBarTable} from './progressBar';

0 commit comments

Comments
 (0)