ui-kit-ck-consultant 0.5.159 → 0.5.163

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.
@@ -9768,7 +9768,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
9768
9768
  if (_this.state.activeDate === currentDate) {
9769
9769
  return 1;
9770
9770
  } else {
9771
- if (_this.props.disabledDates && _this.props.disabledDates.includes(currentDate) || !_this.props.isWeek && [6, 7].includes(parseInt(moment(currentDate).isoWeekday())) || !_this.props.isHoliday && _this.holidays.includes(currentDate)) {
9771
+ if (_this.props.disabledDates && _this.props.disabledDates.includes(currentDate) || !_this.props.isWeek && [6, 7].includes(parseInt(moment(currentDate).isoWeekday())) || !_this.props.isHoliday && _this.holidays.includes(currentDate) || _this.props.minDate && moment(_this.props.minDate).isAfter(moment(currentDate)) || _this.props.maxDate && moment(_this.props.maxDate).isBefore(moment(currentDate))) {
9772
9772
  return 2;
9773
9773
  } else {
9774
9774
  return 0;
@@ -9839,14 +9839,23 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
9839
9839
  this.getArrayDays();
9840
9840
  this.getArrayTime();
9841
9841
  this.setState({
9842
+ year: this.props.valueDate ? parseInt(moment(this.props.valueDate).format('YYYY')) : this.state.year,
9843
+ month: this.props.valueDate ? parseInt(moment(this.props.valueDate).format('M')) : this.state.month,
9842
9844
  activeDate: this.props.valueDate ? this.props.valueDate : this.state.activeDate,
9843
9845
  activeTime: this.props.valueTime ? this.props.valueTime : this.state.Time
9844
9846
  });
9845
9847
  };
9846
9848
 
9847
9849
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
9850
+ if (prevProps.show !== this.props.show) {
9851
+ this.getArrayDays();
9852
+ this.getArrayTime();
9853
+ }
9854
+
9848
9855
  if (prevProps.show !== this.props.show && this.props.show && this.props.valueDate) {
9849
9856
  this.setState({
9857
+ year: parseInt(moment(this.props.valueDate).format('YYYY')),
9858
+ month: parseInt(moment(this.props.valueDate).format('M')),
9850
9859
  activeDate: this.props.valueDate
9851
9860
  });
9852
9861
  }