react-form-builder-more-flexibility 1.0.20 → 1.0.22

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.
@@ -124,7 +124,8 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
124
124
  var _this$props$data = this.props.data,
125
125
  showTimeSelect = _this$props$data.showTimeSelect,
126
126
  showTimeSelectOnly = _this$props$data.showTimeSelectOnly,
127
- showTimeInput = _this$props$data.showTimeInput;
127
+ showTimeInput = _this$props$data.showTimeInput,
128
+ placeholder = _this$props$data.placeholder;
128
129
  var props = {};
129
130
  props.type = 'date';
130
131
  props.className = 'form-control';
@@ -150,7 +151,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
150
151
  name: props.name,
151
152
  ref: props.ref,
152
153
  readOnly: readOnly,
153
- placeholder: this.state.placeholder,
154
+ placeholder: placeholder || this.state.placeholder,
154
155
  value: this.state.value,
155
156
  className: "form-control"
156
157
  }), iOS && !readOnly && /*#__PURE__*/_react["default"].createElement("div", {
@@ -179,7 +180,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
179
180
  onFocus: function onFocus(e) {
180
181
  return _this2.handleBirthdayFocus();
181
182
  },
182
- placeholder: this.state.placeholder,
183
+ placeholder: placeholder || this.state.placeholder,
183
184
  maxLength: "2",
184
185
  pattern: "\\d*"
185
186
  }), this.state.birthdayFocused && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
@@ -252,7 +253,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
252
253
  dateFormat: this.state.formatMask,
253
254
  portalId: "root-portal",
254
255
  autoComplete: "off",
255
- placeholderText: placeholderText
256
+ placeholderText: placeholder || placeholderText
256
257
  }))));
257
258
  }
258
259
  }], [{
package/lib/toolbar.js CHANGED
@@ -472,7 +472,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
472
472
  }
473
473
 
474
474
  // add placeholder to form input
475
- if (['NumberInput', 'EmailInput', 'TextInput', 'PhoneNumber', 'TextArea'].indexOf(element) !== -1) {
475
+ if (['NumberInput', 'EmailInput', 'TextInput', 'PhoneNumber', 'TextArea', 'DatePicker'].indexOf(element) !== -1) {
476
476
  elementOptions.showPlaceholder = true;
477
477
  }
478
478
  if (item.type === 'custom') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-form-builder-more-flexibility",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "A complete form builder for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",