ps-toolkit-ui 0.0.68 → 0.0.69

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.
@@ -996,9 +996,6 @@
996
996
  }
997
997
  return moment__namespace(i, f);
998
998
  };
999
- HelperClass.getMomentAdd = function (a, s) {
1000
- return moment__namespace().add(-1, 'month');
1001
- };
1002
999
  HelperClass.getDateRemain = function (l, dt) {
1003
1000
  var d = parseInt(dt.substring(6, dt.length - 2), 10);
1004
1001
  var now = moment.now();
@@ -3248,22 +3245,9 @@
3248
3245
  else {
3249
3246
  this.active = moment__namespace();
3250
3247
  }
3251
- this.setDate();
3248
+ this.setInpValue(this.inp.value);
3252
3249
  this.inp.setValue = function (v) {
3253
- if (v === null) {
3254
- _this.inp.clear();
3255
- return;
3256
- }
3257
- else if (typeof v === 'string') {
3258
- var d = parseInt(v.substring(6, v.length - 2), 10);
3259
- _this.active = moment__namespace(d);
3260
- }
3261
- else {
3262
- _this.active = moment__namespace(v);
3263
- }
3264
- _this.inp.value = _this.active.format('jYYYY/jMM/jDD');
3265
- _this.inp.search = _this.active.format('jYYYY/jMM/jDD');
3266
- _this.setDate();
3250
+ _this.setInpValue(v);
3267
3251
  };
3268
3252
  this.inp.isValid = function () {
3269
3253
  _this.inp.error = null;
@@ -3299,6 +3283,22 @@
3299
3283
  $__namespace(_this.inputBase.nativeElement).blur();
3300
3284
  };
3301
3285
  };
3286
+ FormDateComponent.prototype.setInpValue = function (v) {
3287
+ if (v === null) {
3288
+ this.inp.clear();
3289
+ return;
3290
+ }
3291
+ else if (typeof v === 'string') {
3292
+ var d = parseInt(v.substring(6, v.length - 2), 10);
3293
+ this.active = moment__namespace(d);
3294
+ }
3295
+ else {
3296
+ this.active = moment__namespace(v);
3297
+ }
3298
+ this.inp.value = this.active.format('jYYYY/jMM/jDD');
3299
+ this.inp.search = this.active.format('jYYYY/jMM/jDD');
3300
+ this.setDate();
3301
+ };
3302
3302
  FormDateComponent.prototype.setDate = function () {
3303
3303
  var n = this.active.clone();
3304
3304
  var countDayInMonth = n.daysInMonth();