setInputMask(input, inputMask, usePlaceholder) {
    if (input && inputMask) {
      const mask = FormioUtils.getInputMask(inputMask, this.placeholderChar);
      this.defaultMask = mask;

      try {
        //destroy previous mask
        if (input.mask) {
          input.mask.destroy();
        }

        input.mask = maskInput({
          inputElement: input,
          mask,
          placeholderChar: this.placeholderChar,
          shadowRoot: this.root ? this.root.shadowRoot : null
        });
      }
      catch (e) {
        // Don't pass error up, to prevent form rejection.
        // Internal bug of vanilla-text-mask on iOS (`selectionEnd`);
        console.warn(e);
      }
      if (mask.numeric) {
        input.setAttribute('pattern', '\\d*');
      }
      if (usePlaceholder) {
        input.setAttribute('placeholder', this.maskPlaceholder(mask));
      }
    }
  }
Sets the input mask for an input.
@param {HTMLElement} input - The html input to apply the mask to.
@param {string} inputMask - The input mask to add to this input.
@param {boolean} usePlaceholder - Set the mask placeholder on the input.