@instructure/ui-date-input 11.7.3-snapshot-39 → 11.7.3-snapshot-42

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.
package/CHANGELOG.md CHANGED
@@ -3,12 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [11.7.3-snapshot-39](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-39) (2026-05-07)
6
+ ## [11.7.3-snapshot-42](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-42) (2026-05-07)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
11
  * **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
12
+ * **ui-date-time-input,ui-date-input,ui-calendar:** set missing aria-selected on calendar days, BREAKING CHANGE: add mandatory prop selectedLabel, change datePickerDialog prop to mandatory ([08abed5](https://github.com/instructure/instructure-ui/commit/08abed5e8c8b29aecab0368e01e8e4ffd0c7fda7))
12
13
 
13
14
 
14
15
 
@@ -265,7 +265,8 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec(_class = class Date
265
265
  value,
266
266
  onChange,
267
267
  disabledDates,
268
- currentDate
268
+ currentDate,
269
+ selectedLabel
269
270
  } = this.props;
270
271
  const isValidDate = value ? DateTime.parse(value, this.locale(), this.timezone()).isValid() : false;
271
272
  const noChildrenProps = this.props.children ? {} : {
@@ -288,7 +289,8 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec(_class = class Date
288
289
  renderNavigationLabel,
289
290
  renderWeekdayLabels,
290
291
  renderNextMonthButton: this.renderMonthNavigationButton('next'),
291
- renderPrevMonthButton: this.renderMonthNavigationButton('prev')
292
+ renderPrevMonthButton: this.renderMonthNavigationButton('prev'),
293
+ selectedLabel
292
294
  }),
293
295
  ...noChildrenProps,
294
296
  children: this.renderDays(getOptionProps)
@@ -22,5 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children', 'disabledDates', 'currentDate', 'disabledDateErrorMessage', 'invalidDateErrorMessage', 'locale', 'timezone'];
25
+ const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children', 'disabledDates', 'currentDate', 'disabledDateErrorMessage', 'invalidDateErrorMessage', 'locale', 'timezone', 'withYearPicker', 'selectedLabel'];
26
26
  export { allowedProps };
@@ -250,6 +250,7 @@ const DateInput = /*#__PURE__*/forwardRef(({
250
250
  withYearPicker: withYearPicker,
251
251
  onDateSelected: handleDateSelected,
252
252
  selectedDate: selectedDate,
253
+ selectedLabel: screenReaderLabels.selectedLabel,
253
254
  disabledDates: disabledDates,
254
255
  visibleMonth: selectedDate,
255
256
  locale: userLocale,
@@ -249,6 +249,7 @@ const DateInput2 = /*#__PURE__*/forwardRef(({
249
249
  withYearPicker: withYearPicker,
250
250
  onDateSelected: handleDateSelected,
251
251
  selectedDate: selectedDate,
252
+ selectedLabel: screenReaderLabels.selectedLabel,
252
253
  disabledDates: disabledDates,
253
254
  visibleMonth: selectedDate,
254
255
  locale: userLocale,
@@ -275,7 +275,8 @@ let DateInput = exports.DateInput = (_dec = (0, _emotion.withStyle)(_styles.defa
275
275
  value,
276
276
  onChange,
277
277
  disabledDates,
278
- currentDate
278
+ currentDate,
279
+ selectedLabel
279
280
  } = this.props;
280
281
  const isValidDate = value ? _DateTime.DateTime.parse(value, this.locale(), this.timezone()).isValid() : false;
281
282
  const noChildrenProps = this.props.children ? {} : {
@@ -298,7 +299,8 @@ let DateInput = exports.DateInput = (_dec = (0, _emotion.withStyle)(_styles.defa
298
299
  renderNavigationLabel,
299
300
  renderWeekdayLabels,
300
301
  renderNextMonthButton: this.renderMonthNavigationButton('next'),
301
- renderPrevMonthButton: this.renderMonthNavigationButton('prev')
302
+ renderPrevMonthButton: this.renderMonthNavigationButton('prev'),
303
+ selectedLabel
302
304
  }),
303
305
  ...noChildrenProps,
304
306
  children: this.renderDays(getOptionProps)
@@ -28,4 +28,4 @@ exports.allowedProps = void 0;
28
28
  * SOFTWARE.
29
29
  */
30
30
 
31
- const allowedProps = exports.allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children', 'disabledDates', 'currentDate', 'disabledDateErrorMessage', 'invalidDateErrorMessage', 'locale', 'timezone'];
31
+ const allowedProps = exports.allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children', 'disabledDates', 'currentDate', 'disabledDateErrorMessage', 'invalidDateErrorMessage', 'locale', 'timezone', 'withYearPicker', 'selectedLabel'];
@@ -258,6 +258,7 @@ const DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(({
258
258
  withYearPicker: withYearPicker,
259
259
  onDateSelected: handleDateSelected,
260
260
  selectedDate: selectedDate,
261
+ selectedLabel: screenReaderLabels.selectedLabel,
261
262
  disabledDates: disabledDates,
262
263
  visibleMonth: selectedDate,
263
264
  locale: userLocale,
@@ -257,6 +257,7 @@ const DateInput2 = exports.DateInput2 = /*#__PURE__*/(0, _react.forwardRef)(({
257
257
  withYearPicker: withYearPicker,
258
258
  onDateSelected: handleDateSelected,
259
259
  selectedDate: selectedDate,
260
+ selectedLabel: screenReaderLabels.selectedLabel,
260
261
  disabledDates: disabledDates,
261
262
  visibleMonth: selectedDate,
262
263
  locale: userLocale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-date-input",
3
- "version": "11.7.3-snapshot-39",
3
+ "version": "11.7.3-snapshot-42",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,28 +15,27 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.2",
18
- "moment-timezone": "^0.6.2",
19
- "@instructure/shared-types": "11.7.3-snapshot-39",
20
- "@instructure/emotion": "11.7.3-snapshot-39",
21
- "@instructure/ui-form-field": "11.7.3-snapshot-39",
22
- "@instructure/ui-i18n": "11.7.3-snapshot-39",
23
- "@instructure/ui-calendar": "11.7.3-snapshot-39",
24
- "@instructure/ui-icons": "11.7.3-snapshot-39",
25
- "@instructure/ui-popover": "11.7.3-snapshot-39",
26
- "@instructure/ui-position": "11.7.3-snapshot-39",
27
- "@instructure/ui-react-utils": "11.7.3-snapshot-39",
28
- "@instructure/ui-selectable": "11.7.3-snapshot-39",
29
- "@instructure/ui-utils": "11.7.3-snapshot-39",
30
- "@instructure/ui-text-input": "11.7.3-snapshot-39"
18
+ "@instructure/emotion": "11.7.3-snapshot-42",
19
+ "@instructure/shared-types": "11.7.3-snapshot-42",
20
+ "@instructure/ui-calendar": "11.7.3-snapshot-42",
21
+ "@instructure/ui-i18n": "11.7.3-snapshot-42",
22
+ "@instructure/ui-form-field": "11.7.3-snapshot-42",
23
+ "@instructure/ui-icons": "11.7.3-snapshot-42",
24
+ "@instructure/ui-position": "11.7.3-snapshot-42",
25
+ "@instructure/ui-popover": "11.7.3-snapshot-42",
26
+ "@instructure/ui-react-utils": "11.7.3-snapshot-42",
27
+ "@instructure/ui-selectable": "11.7.3-snapshot-42",
28
+ "@instructure/ui-utils": "11.7.3-snapshot-42",
29
+ "@instructure/ui-text-input": "11.7.3-snapshot-42"
31
30
  },
32
31
  "devDependencies": {
33
32
  "@testing-library/jest-dom": "^6.6.3",
34
33
  "@testing-library/react": "15.0.7",
35
34
  "@testing-library/user-event": "^14.6.1",
36
35
  "vitest": "^3.2.2",
37
- "@instructure/ui-babel-preset": "11.7.3-snapshot-39",
38
- "@instructure/ui-buttons": "11.7.3-snapshot-39",
39
- "@instructure/ui-scripts": "11.7.3-snapshot-39"
36
+ "@instructure/ui-babel-preset": "11.7.3-snapshot-42",
37
+ "@instructure/ui-buttons": "11.7.3-snapshot-42",
38
+ "@instructure/ui-scripts": "11.7.3-snapshot-42"
40
39
  },
41
40
  "peerDependencies": {
42
41
  "react": ">=18 <=19"
@@ -207,6 +207,7 @@ class Example extends React.Component {
207
207
  isToday={date.isSame(todayDate, 'day')}
208
208
  isOutsideMonth={!date.isSame(renderedDate, 'month')}
209
209
  label={`${date.format('D')} ${date.format('MMMM')} ${date.format('YYYY')}`}
210
+ selectedLabel="Selected"
210
211
  onClick={this.handleDayClick}
211
212
  >
212
213
  {date.format('D')}
@@ -328,7 +328,8 @@ class DateInput extends Component<DateInputProps, DateInputState> {
328
328
  value,
329
329
  onChange,
330
330
  disabledDates,
331
- currentDate
331
+ currentDate,
332
+ selectedLabel
332
333
  } = this.props
333
334
 
334
335
  const isValidDate = value
@@ -365,7 +366,8 @@ class DateInput extends Component<DateInputProps, DateInputState> {
365
366
  renderNavigationLabel,
366
367
  renderWeekdayLabels,
367
368
  renderNextMonthButton: this.renderMonthNavigationButton('next'),
368
- renderPrevMonthButton: this.renderMonthNavigationButton('prev')
369
+ renderPrevMonthButton: this.renderMonthNavigationButton('prev'),
370
+ selectedLabel
369
371
  }) as CalendarProps)}
370
372
  {...noChildrenProps}
371
373
  >
@@ -253,6 +253,11 @@ type DateInputOwnProps = {
253
253
  startYear: number
254
254
  endYear: number
255
255
  }
256
+ /**
257
+ * Screen reader label appended to the date label when the day is selected.
258
+ * Used to announce the selected state to assistive technologies.
259
+ */
260
+ selectedLabel?: string
256
261
  }
257
262
 
258
263
  type PropKeys = keyof DateInputOwnProps
@@ -302,7 +307,9 @@ const allowedProps: AllowedPropKeys = [
302
307
  'disabledDateErrorMessage',
303
308
  'invalidDateErrorMessage',
304
309
  'locale',
305
- 'timezone'
310
+ 'timezone',
311
+ 'withYearPicker',
312
+ 'selectedLabel'
306
313
  ]
307
314
 
308
315
  type DateInputState = {
@@ -29,7 +29,8 @@ type: example
29
29
  calendarIcon: 'Calendar',
30
30
  nextMonthButton: 'Next month',
31
31
  prevMonthButton: 'Previous month',
32
- datePickerDialog: 'Date picker'
32
+ datePickerDialog: 'Date picker',
33
+ selectedLabel: 'Selected'
33
34
  }}
34
35
  value={inputValue}
35
36
  width="20rem"
@@ -79,7 +80,8 @@ const Example = () => {
79
80
  calendarIcon: 'Calendar',
80
81
  nextMonthButton: 'Next month',
81
82
  prevMonthButton: 'Previous month',
82
- datePickerDialog: 'Date picker'
83
+ datePickerDialog: 'Date picker',
84
+ selectedLabel: 'Selected'
83
85
  }}
84
86
  width="20rem"
85
87
  value={value}
@@ -93,7 +95,8 @@ const Example = () => {
93
95
  calendarIcon: 'Calendar',
94
96
  nextMonthButton: 'Next month',
95
97
  prevMonthButton: 'Previous month',
96
- datePickerDialog: 'Date picker'
98
+ datePickerDialog: 'Date picker',
99
+ selectedLabel: 'Selected'
97
100
  }}
98
101
  width="20rem"
99
102
  value={value2}
@@ -108,7 +111,8 @@ const Example = () => {
108
111
  calendarIcon: 'Calendar',
109
112
  nextMonthButton: 'Next month',
110
113
  prevMonthButton: 'Previous month',
111
- datePickerDialog: 'Date picker'
114
+ datePickerDialog: 'Date picker',
115
+ selectedLabel: 'Selected'
112
116
  }}
113
117
  width="20rem"
114
118
  value={value3}
@@ -160,7 +164,8 @@ type: example
160
164
  calendarIcon: 'Calendar',
161
165
  nextMonthButton: 'Next month',
162
166
  prevMonthButton: 'Previous month',
163
- datePickerDialog: 'Date picker'
167
+ datePickerDialog: 'Date picker',
168
+ selectedLabel: 'Selected'
164
169
  }}
165
170
  value={inputValue}
166
171
  width="20rem"
@@ -230,7 +235,8 @@ const Example = () => {
230
235
  calendarIcon: 'Calendar',
231
236
  nextMonthButton: 'Next month',
232
237
  prevMonthButton: 'Previous month',
233
- datePickerDialog: 'Date picker'
238
+ datePickerDialog: 'Date picker',
239
+ selectedLabel: 'Selected'
234
240
  }}
235
241
  width="20rem"
236
242
  value={value}
@@ -272,7 +278,8 @@ const Example = () => {
272
278
  calendarIcon: 'Calendar',
273
279
  nextMonthButton: 'Next month',
274
280
  prevMonthButton: 'Previous month',
275
- datePickerDialog: 'Date picker'
281
+ datePickerDialog: 'Date picker',
282
+ selectedLabel: 'Selected'
276
283
  }}
277
284
  value={inputValue}
278
285
  locale="en-us"
@@ -306,6 +306,7 @@ const DateInput = forwardRef(
306
306
  withYearPicker={withYearPicker}
307
307
  onDateSelected={handleDateSelected}
308
308
  selectedDate={selectedDate}
309
+ selectedLabel={screenReaderLabels.selectedLabel}
309
310
  disabledDates={disabledDates}
310
311
  visibleMonth={selectedDate}
311
312
  locale={userLocale}
@@ -33,14 +33,14 @@ type DateInputOwnProps = {
33
33
  */
34
34
  renderLabel: Renderable
35
35
  /**
36
- * Accessible labels for the calendar button, month navigation buttons, and date picker dialog.
36
+ * Accessible labels for the calendar button, month navigation buttons, date picker dialog, and selected date state.
37
37
  */
38
38
  screenReaderLabels: {
39
39
  calendarIcon: string
40
40
  prevMonthButton: string
41
41
  nextMonthButton: string
42
- // TODO: Make this field required in the next version. Currently optional to avoid breaking change.
43
- datePickerDialog?: string
42
+ datePickerDialog: string
43
+ selectedLabel: string
44
44
  }
45
45
  /**
46
46
  * Specifies the input value.
@@ -29,7 +29,8 @@ type: example
29
29
  calendarIcon: 'Calendar',
30
30
  nextMonthButton: 'Next month',
31
31
  prevMonthButton: 'Previous month',
32
- datePickerDialog: 'Date picker'
32
+ datePickerDialog: 'Date picker',
33
+ selectedLabel: 'Selected'
33
34
  }}
34
35
  value={inputValue}
35
36
  width="20rem"
@@ -79,7 +80,8 @@ const Example = () => {
79
80
  calendarIcon: 'Calendar',
80
81
  nextMonthButton: 'Next month',
81
82
  prevMonthButton: 'Previous month',
82
- datePickerDialog: 'Date picker'
83
+ datePickerDialog: 'Date picker',
84
+ selectedLabel: 'Selected'
83
85
  }}
84
86
  width="20rem"
85
87
  value={value}
@@ -93,7 +95,8 @@ const Example = () => {
93
95
  calendarIcon: 'Calendar',
94
96
  nextMonthButton: 'Next month',
95
97
  prevMonthButton: 'Previous month',
96
- datePickerDialog: 'Date picker'
98
+ datePickerDialog: 'Date picker',
99
+ selectedLabel: 'Selected'
97
100
  }}
98
101
  width="20rem"
99
102
  value={value2}
@@ -108,7 +111,8 @@ const Example = () => {
108
111
  calendarIcon: 'Calendar',
109
112
  nextMonthButton: 'Next month',
110
113
  prevMonthButton: 'Previous month',
111
- datePickerDialog: 'Date picker'
114
+ datePickerDialog: 'Date picker',
115
+ selectedLabel: 'Selected'
112
116
  }}
113
117
  width="20rem"
114
118
  value={value3}
@@ -160,7 +164,8 @@ type: example
160
164
  calendarIcon: 'Calendar',
161
165
  nextMonthButton: 'Next month',
162
166
  prevMonthButton: 'Previous month',
163
- datePickerDialog: 'Date picker'
167
+ datePickerDialog: 'Date picker',
168
+ selectedLabel: 'Selected'
164
169
  }}
165
170
  value={inputValue}
166
171
  width="20rem"
@@ -230,7 +235,8 @@ const Example = () => {
230
235
  calendarIcon: 'Calendar',
231
236
  nextMonthButton: 'Next month',
232
237
  prevMonthButton: 'Previous month',
233
- datePickerDialog: 'Date picker'
238
+ datePickerDialog: 'Date picker',
239
+ selectedLabel: 'Selected'
234
240
  }}
235
241
  width="20rem"
236
242
  value={value}
@@ -272,7 +278,8 @@ const Example = () => {
272
278
  calendarIcon: 'Calendar',
273
279
  nextMonthButton: 'Next month',
274
280
  prevMonthButton: 'Previous month',
275
- datePickerDialog: 'Date picker'
281
+ datePickerDialog: 'Date picker',
282
+ selectedLabel: 'Selected'
276
283
  }}
277
284
  value={inputValue}
278
285
  locale="en-us"
@@ -305,6 +305,7 @@ const DateInput2 = forwardRef(
305
305
  withYearPicker={withYearPicker}
306
306
  onDateSelected={handleDateSelected}
307
307
  selectedDate={selectedDate}
308
+ selectedLabel={screenReaderLabels.selectedLabel}
308
309
  disabledDates={disabledDates}
309
310
  visibleMonth={selectedDate}
310
311
  locale={userLocale}
@@ -33,7 +33,7 @@ type DateInput2OwnProps = {
33
33
  */
34
34
  renderLabel: Renderable
35
35
  /**
36
- * Accessible labels for the calendar button, month navigation buttons, and date picker dialog.
36
+ * Accessible labels for the calendar button, month navigation buttons, date picker dialog, and selected date state.
37
37
  */
38
38
  screenReaderLabels: {
39
39
  calendarIcon: string
@@ -41,6 +41,7 @@ type DateInput2OwnProps = {
41
41
  nextMonthButton: string
42
42
  // TODO: Make this field required in the next version. Currently optional to avoid breaking change.
43
43
  datePickerDialog?: string
44
+ selectedLabel?: string
44
45
  }
45
46
  /**
46
47
  * Specifies the input value.