@formio/js 5.1.0-dev.6209.9bd8843 → 5.1.0-dev.6211.5d30602
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.
@@ -246,6 +246,9 @@ class CalendarWidget extends InputWidget_1.default {
|
|
246
246
|
if (!this.calendar) {
|
247
247
|
return super.getValue();
|
248
248
|
}
|
249
|
+
if (this.settings.isManuallyOverriddenValue) {
|
250
|
+
return this.settings.manualInputValue;
|
251
|
+
}
|
249
252
|
// Get the selected dates from the calendar widget.
|
250
253
|
const dates = this.calendar.selectedDates;
|
251
254
|
if (!dates || !dates.length) {
|
@@ -353,6 +356,15 @@ class CalendarWidget extends InputWidget_1.default {
|
|
353
356
|
this.calendar.updateValue(false);
|
354
357
|
});
|
355
358
|
}
|
359
|
+
// Move input attributes to altInput.
|
360
|
+
const labelledbyIds = this.calendar.input.getAttribute('aria-labelledby');
|
361
|
+
const isRequired = this.calendar.input.getAttribute('aria-required');
|
362
|
+
this.calendar.altInput.id = this._input.id;
|
363
|
+
this.calendar.altInput.setAttribute('aria-labelledby', labelledbyIds);
|
364
|
+
this.calendar.altInput.setAttribute('aria-required', isRequired);
|
365
|
+
this._input.removeAttribute('id');
|
366
|
+
this._input.removeAttribute('aria-labelledby');
|
367
|
+
this._input.removeAttribute('aria-required');
|
356
368
|
const excludedFromMaskFormats = ['MMMM'];
|
357
369
|
if (!this.settings.readOnly && !lodash_1.default.some(excludedFromMaskFormats, format => lodash_1.default.includes(this.settings.format, format))) {
|
358
370
|
// Enforce the input mask of the format.
|
@@ -238,6 +238,9 @@ export default class CalendarWidget extends InputWidget {
|
|
238
238
|
if (!this.calendar) {
|
239
239
|
return super.getValue();
|
240
240
|
}
|
241
|
+
if (this.settings.isManuallyOverriddenValue) {
|
242
|
+
return this.settings.manualInputValue;
|
243
|
+
}
|
241
244
|
// Get the selected dates from the calendar widget.
|
242
245
|
const dates = this.calendar.selectedDates;
|
243
246
|
if (!dates || !dates.length) {
|
@@ -344,6 +347,15 @@ export default class CalendarWidget extends InputWidget {
|
|
344
347
|
this.calendar.updateValue(false);
|
345
348
|
});
|
346
349
|
}
|
350
|
+
// Move input attributes to altInput.
|
351
|
+
const labelledbyIds = this.calendar.input.getAttribute('aria-labelledby');
|
352
|
+
const isRequired = this.calendar.input.getAttribute('aria-required');
|
353
|
+
this.calendar.altInput.id = this._input.id;
|
354
|
+
this.calendar.altInput.setAttribute('aria-labelledby', labelledbyIds);
|
355
|
+
this.calendar.altInput.setAttribute('aria-required', isRequired);
|
356
|
+
this._input.removeAttribute('id');
|
357
|
+
this._input.removeAttribute('aria-labelledby');
|
358
|
+
this._input.removeAttribute('aria-required');
|
347
359
|
const excludedFromMaskFormats = ['MMMM'];
|
348
360
|
if (!this.settings.readOnly && !_.some(excludedFromMaskFormats, format => _.includes(this.settings.format, format))) {
|
349
361
|
// Enforce the input mask of the format.
|