ps-toolkit-ui 1.12.40 → 1.12.41

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.
@@ -3970,7 +3970,8 @@
3970
3970
  if (!_this.inp.required && !_this.inp.value) {
3971
3971
  return true;
3972
3972
  }
3973
- if (!moment__namespace(_this.inp.value, 'jYYYY/jMM/jDD').isValid()) {
3973
+ console.log(_this.inp.value, !moment__namespace(_this.inp.value, 'jYYYY/jMM').isValid());
3974
+ if ((_this.inp.type === exports.InputType.Month && !moment__namespace(_this.inp.value, 'jYYYY/jMM').isValid()) || (_this.inp.type !== exports.InputType.Month && !moment__namespace(_this.inp.value, 'jYYYY/jMM/jDD').isValid())) {
3974
3975
  _this.inp.error = exports.InputError.Invalid;
3975
3976
  return false;
3976
3977
  }
@@ -4024,7 +4025,7 @@
4024
4025
  else {
4025
4026
  this.active = v;
4026
4027
  }
4027
- this.inp.value = this.active.format('jYYYY/jMM/jDD');
4028
+ this.inp.value = this.active.format(this.inp.type === exports.InputType.Month ? 'jMMMM jYYYY' : 'jYYYY/jMM/jDD');
4028
4029
  this.inp.search = this.active.format(this.inp.type === exports.InputType.Month ? 'jMMMM jYYYY' : 'jYYYY/jMM/jDD');
4029
4030
  this.setDate();
4030
4031
  };
@@ -4178,7 +4179,7 @@
4178
4179
  }
4179
4180
  };
4180
4181
  FormDateComponent.prototype.setValue = function (y, m, d) {
4181
- this.inp.value = y + '/' + (m > 9 ? m : '0' + m) + '/' + (d > 9 ? d : '0' + d);
4182
+ this.inp.value = this.inp.type === exports.InputType.Month ? this.months[m - 1] + ' ' + y : y + '/' + (m > 9 ? m : '0' + m) + '/' + (d > 9 ? d : '0' + d);
4182
4183
  this.inp.search = this.inp.type === exports.InputType.Month ? this.months[m - 1] + ' ' + y : y + '/' + (m > 9 ? m : '0' + m) + '/' + (d > 9 ? d : '0' + d);
4183
4184
  };
4184
4185
  FormDateComponent.prototype.changeState = function (s) {