@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.
@@ -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, hasEncodedTimezone, } from '../utils/utils';
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() || this.settings.skipOffset) {
446
+ if (!this.settings.enableTime || this.loadZones()) {
452
447
  return Flatpickr.formatDate(date, format);
453
448
  }
454
449
  const currentValue = new Date(this.getValue());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6082.6dd4100",
3
+ "version": "5.1.0-dev.6085.9179bc5",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {