glud-component
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -64,3 +64,3 @@ 'use strict'; | ||
isShowCalendar: false, | ||
dateValue: (0, _moment2.default)() | ||
dateValue: null | ||
}, _this.componentDidMount = function () { | ||
@@ -137,3 +137,3 @@ _this.setState({ | ||
onFocus: this.handleInputFocus, | ||
value: dateValue.format(format), | ||
value: dateValue ? dateValue.format(format) : '', | ||
iconRight: function iconRight() { | ||
@@ -172,3 +172,3 @@ return _react2.default.createElement('i', { className: 'fas fa-calendar' }); | ||
format: _propTypes2.default.string, | ||
value: _customTyepsUtil2.default.moment, | ||
value: _propTypes2.default.oneOfType([_customTyepsUtil2.default.moment, _propTypes2.default.oneOf([null])]), | ||
onChange: _propTypes2.default.func, | ||
@@ -175,0 +175,0 @@ onFocus: _propTypes2.default.func, |
@@ -131,4 +131,5 @@ 'use strict'; | ||
var startDate = (0, _get2.default)(dateRangeValue, 'start', moment()); | ||
var endDate = (0, _get2.default)(dateRangeValue, 'end', moment()); | ||
var startDate = (0, _get2.default)(dateRangeValue, 'start', null); | ||
var endDate = (0, _get2.default)(dateRangeValue, 'end', null); | ||
var value = dateRangeValue ? startDate.format(format) + ' - ' + endDate.format(format) : ''; | ||
@@ -148,3 +149,3 @@ return _react2.default.createElement( | ||
onFocus: this.handleInputFocus, | ||
value: startDate.format(format) + ' - ' + endDate.format(format), | ||
value: value, | ||
iconRight: function iconRight() { | ||
@@ -184,3 +185,3 @@ return _react2.default.createElement('i', { className: 'fas fa-calendar' }); | ||
format: _propTypes2.default.string, | ||
value: _customTyepsUtil2.default.momentRange, | ||
value: _propTypes2.default.oneOfType([_customTyepsUtil2.default.momentRange, _propTypes2.default.oneOf([null])]), | ||
onChange: _propTypes2.default.func, | ||
@@ -187,0 +188,0 @@ onFocus: _propTypes2.default.func, |
{ | ||
"name": "glud-component", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
1427885
4863