@formio/js 5.0.0-dev.5857.f4bbbbf → 5.0.0-dev.5859.acbf6fa

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.
@@ -1757,12 +1757,12 @@ class Component extends Element_1.default {
1757
1757
  var _a, _b, _c;
1758
1758
  if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.currentSelection) {
1759
1759
  if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
1760
- const { selection, index } = this.root.currentSelection;
1760
+ const { index } = this.root.currentSelection;
1761
1761
  let input = this.refs.input[index];
1762
1762
  const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test((i === null || i === void 0 ? void 0 : i.type) || '');
1763
1763
  if (input) {
1764
1764
  if (isInputRangeSelectable(input)) {
1765
- input.setSelectionRange(...selection);
1765
+ input.setSelectionRange(input.value.length, input.value.length);
1766
1766
  }
1767
1767
  }
1768
1768
  else {
@@ -584,9 +584,6 @@ class DayComponent extends Field_1.default {
584
584
  * @returns {string|null} - The string value of the date.
585
585
  */
586
586
  getValueAsString(value) {
587
- if (!value) {
588
- return '';
589
- }
590
587
  return this.getDate(value) || '';
591
588
  }
592
589
  focus(field) {
@@ -1720,12 +1720,12 @@ export default class Component extends Element {
1720
1720
  restoreCaretPosition() {
1721
1721
  if (this.root?.currentSelection) {
1722
1722
  if (this.refs.input?.length) {
1723
- const { selection, index } = this.root.currentSelection;
1723
+ const { index } = this.root.currentSelection;
1724
1724
  let input = this.refs.input[index];
1725
1725
  const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test(i?.type || '');
1726
1726
  if (input) {
1727
1727
  if (isInputRangeSelectable(input)) {
1728
- input.setSelectionRange(...selection);
1728
+ input.setSelectionRange(input.value.length, input.value.length);
1729
1729
  }
1730
1730
  }
1731
1731
  else {
@@ -582,9 +582,6 @@ export default class DayComponent extends Field {
582
582
  * @returns {string|null} - The string value of the date.
583
583
  */
584
584
  getValueAsString(value) {
585
- if (!value) {
586
- return '';
587
- }
588
585
  return this.getDate(value) || '';
589
586
  }
590
587
  focus(field) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5857.f4bbbbf",
3
+ "version": "5.0.0-dev.5859.acbf6fa",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {