@formio/js 5.1.0-dev.6082.6dd4100 → 5.1.0-dev.6085.9179bc5
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/dist/formio.form.js +6 -6
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +6 -6
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Webform.js +3 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +27 -2
- package/lib/cjs/components/_classes/component/Component.js +62 -32
- package/lib/cjs/components/form/Form.d.ts +0 -1
- package/lib/cjs/components/form/Form.js +12 -20
- package/lib/cjs/components/textfield/TextField.js +2 -2
- package/lib/cjs/utils/utils.d.ts +0 -9
- package/lib/cjs/utils/utils.js +1 -16
- package/lib/cjs/widgets/CalendarWidget.js +1 -6
- package/lib/mjs/Webform.js +3 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +27 -2
- package/lib/mjs/components/_classes/component/Component.js +62 -32
- package/lib/mjs/components/form/Form.d.ts +0 -1
- package/lib/mjs/components/form/Form.js +12 -20
- package/lib/mjs/components/textfield/TextField.js +2 -2
- package/lib/mjs/utils/utils.d.ts +0 -9
- package/lib/mjs/utils/utils.js +0 -14
- package/lib/mjs/widgets/CalendarWidget.js +2 -7
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Formio } from '../Formio';
|
2
2
|
import InputWidget from './InputWidget';
|
3
|
-
import { convertFormatToFlatpickr, convertFormatToMask, convertFormatToMoment, formatDate, formatOffset, getBrowserInfo, getDateSetting, getLocaleDateFormatInfo, momentDate, zonesLoaded, shouldLoadZones, loadZones,
|
3
|
+
import { convertFormatToFlatpickr, convertFormatToMask, convertFormatToMoment, formatDate, formatOffset, getBrowserInfo, getDateSetting, getLocaleDateFormatInfo, momentDate, zonesLoaded, shouldLoadZones, loadZones, } from '../utils/utils';
|
4
4
|
import moment from 'moment';
|
5
5
|
import _ from 'lodash';
|
6
6
|
const DEFAULT_FORMAT = 'yyyy-MM-dd hh:mm a';
|
@@ -278,11 +278,6 @@ export default class CalendarWidget extends InputWidget {
|
|
278
278
|
value = value ? formatDate(this.timezonesUrl, value, convertFormatToMoment(this.settings.format), this.timezone, convertFormatToMoment(this.valueMomentFormat)) : value;
|
279
279
|
return super.setValue(value);
|
280
280
|
}
|
281
|
-
// If the component is a textfield that does not have timezone information included in the string value then skip
|
282
|
-
// the timezone offset
|
283
|
-
if (this.component.type === 'textfield' && !(hasEncodedTimezone)(value)) {
|
284
|
-
this.settings.skipOffset = true;
|
285
|
-
}
|
286
281
|
const zonesLoading = this.loadZones();
|
287
282
|
if (value) {
|
288
283
|
if (!saveAsText && this.settings.readOnly && !zonesLoading) {
|
@@ -448,7 +443,7 @@ export default class CalendarWidget extends InputWidget {
|
|
448
443
|
return (date, format) => {
|
449
444
|
// Only format this if this is the altFormat and the form is readOnly.
|
450
445
|
if (this.settings.readOnly && (format === this.settings.altFormat)) {
|
451
|
-
if (!this.settings.enableTime || this.loadZones()
|
446
|
+
if (!this.settings.enableTime || this.loadZones()) {
|
452
447
|
return Flatpickr.formatDate(date, format);
|
453
448
|
}
|
454
449
|
const currentValue = new Date(this.getValue());
|