react-survey-builder 1.0.32 → 1.0.33
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/index.js +1 -1
- package/lib/survey-elements/index.js +33 -26
- package/package.json +1 -1
@@ -528,9 +528,11 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
528
528
|
var _this8 = this;
|
529
529
|
var props = {};
|
530
530
|
props.name = this.props.name;
|
531
|
-
props.placeholder = this.props.item.placeholder;
|
531
|
+
props.placeholder = this.props.item.placeholder || this.props.item.formatMask || 'MM/DD/YYYY';
|
532
532
|
props.onChange = function (val) {
|
533
|
-
_this8.props.onChange
|
533
|
+
if (_this8.props.onChange !== undefined) {
|
534
|
+
_this8.props.onChange(val);
|
535
|
+
}
|
534
536
|
};
|
535
537
|
props.value = this.props.value;
|
536
538
|
props.isInvalid = this.props.isInvalid;
|
@@ -561,31 +563,36 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
561
563
|
htmlFor: props.name
|
562
564
|
})), /*#__PURE__*/_react["default"].createElement("div", null, this.props.value)));
|
563
565
|
}
|
566
|
+
console.log(this.props);
|
564
567
|
console.log(props);
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
568
|
+
if (this.props) {
|
569
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
570
|
+
style: _objectSpread({}, this.props.style),
|
571
|
+
className: baseClasses
|
572
|
+
}, /*#__PURE__*/_react["default"].createElement(_componentHeader["default"], this.props), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Group, {
|
573
|
+
className: "form-group mb-3"
|
574
|
+
}, labelLocation === "FLOATING" ? /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Floating, null, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Control, (0, _extends2["default"])({
|
575
|
+
id: props.name,
|
576
|
+
type: "text"
|
577
|
+
}, props, {
|
578
|
+
as: CustomDateInput
|
579
|
+
})), /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], (0, _extends2["default"])({}, this.props, {
|
580
|
+
htmlFor: props.name
|
581
|
+
}))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], (0, _extends2["default"])({}, this.props, {
|
582
|
+
htmlFor: props.name
|
583
|
+
})), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Control, (0, _extends2["default"])({
|
584
|
+
id: props.name,
|
585
|
+
type: "text"
|
586
|
+
}, props, {
|
587
|
+
as: CustomDateInput
|
588
|
+
}))), this.props.item.help ? /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Text, {
|
589
|
+
muted: true
|
590
|
+
}, this.props.item.help) : null, /*#__PURE__*/_react["default"].createElement(_componentErrorMessage["default"], {
|
591
|
+
name: props.name
|
592
|
+
})));
|
593
|
+
} else {
|
594
|
+
return null;
|
595
|
+
}
|
589
596
|
}
|
590
597
|
}]);
|
591
598
|
return DatePicker;
|