@pdg/react-form 1.0.72 → 1.0.73

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 CHANGED
@@ -14240,14 +14240,20 @@ var FormMonthPicker = React.forwardRef(function (_a, ref) {
14240
14240
  },
14241
14241
  getYear: function () { return (lastValue ? lastValue.year : null); },
14242
14242
  setYear: function (year) {
14243
- lastValue = getFinalValue(lastValue
14244
- ? { year: year, month: lastValue.month }
14245
- : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 });
14243
+ lastValue = getFinalValue(year === null
14244
+ ? null
14245
+ : lastValue
14246
+ ? { year: year, month: lastValue.month }
14247
+ : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 });
14246
14248
  setValue(lastValue);
14247
14249
  },
14248
14250
  getMonth: function () { return (lastValue ? lastValue.month : null); },
14249
14251
  setMonth: function (month) {
14250
- lastValue = getFinalValue(lastValue ? { year: lastValue.year, month: month } : { year: new Date().getFullYear(), month: month });
14252
+ lastValue = getFinalValue(month === null
14253
+ ? null
14254
+ : lastValue
14255
+ ? { year: lastValue.year, month: month }
14256
+ : { year: new Date().getFullYear(), month: month });
14251
14257
  setValue(lastValue);
14252
14258
  },
14253
14259
  isExceptValue: function () { return !!exceptValue; },
@@ -14623,9 +14629,11 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
14623
14629
  getFromYear: function () { return (lastValue[0] ? lastValue[0].year : null); },
14624
14630
  setFromYear: function (year) {
14625
14631
  lastValue = getFinalValue([
14626
- lastValue[0]
14627
- ? { year: year, month: lastValue[0].month }
14628
- : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
14632
+ year === null
14633
+ ? null
14634
+ : lastValue[0]
14635
+ ? { year: year, month: lastValue[0].month }
14636
+ : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
14629
14637
  lastValue[1],
14630
14638
  ]);
14631
14639
  setValue(lastValue);
@@ -14633,7 +14641,11 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
14633
14641
  getFromMonth: function () { return (lastValue[0] ? lastValue[0].month : null); },
14634
14642
  setFromMonth: function (month) {
14635
14643
  lastValue = getFinalValue([
14636
- lastValue[0] ? { year: lastValue[0].year, month: month } : { year: new Date().getFullYear(), month: month },
14644
+ month === null
14645
+ ? null
14646
+ : lastValue[0]
14647
+ ? { year: lastValue[0].year, month: month }
14648
+ : { year: new Date().getFullYear(), month: month },
14637
14649
  lastValue[1],
14638
14650
  ]);
14639
14651
  setValue(lastValue);
@@ -14642,9 +14654,11 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
14642
14654
  setToYear: function (year) {
14643
14655
  lastValue = getFinalValue([
14644
14656
  lastValue[0],
14645
- lastValue[1]
14646
- ? { year: year, month: lastValue[1].month }
14647
- : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
14657
+ year === null
14658
+ ? null
14659
+ : lastValue[1]
14660
+ ? { year: year, month: lastValue[1].month }
14661
+ : { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
14648
14662
  ]);
14649
14663
  setValue(lastValue);
14650
14664
  },
@@ -14652,7 +14666,11 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
14652
14666
  setToMonth: function (month) {
14653
14667
  lastValue = getFinalValue([
14654
14668
  lastValue[0],
14655
- lastValue[1] ? { year: lastValue[1].year, month: month } : { year: new Date().getFullYear(), month: month },
14669
+ month === null
14670
+ ? null
14671
+ : lastValue[1]
14672
+ ? { year: lastValue[1].year, month: month }
14673
+ : { year: new Date().getFullYear(), month: month },
14656
14674
  ]);
14657
14675
  setValue(lastValue);
14658
14676
  },