ps-toolkit-ui 0.0.66 → 0.0.70

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.
@@ -3245,22 +3245,9 @@
3245
3245
  else {
3246
3246
  this.active = moment__namespace();
3247
3247
  }
3248
- this.setDate();
3248
+ this.setInpValue(this.inp.value);
3249
3249
  this.inp.setValue = function (v) {
3250
- if (v === null) {
3251
- _this.inp.clear();
3252
- return;
3253
- }
3254
- else if (typeof v === 'string') {
3255
- var d = parseInt(v.substring(6, v.length - 2), 10);
3256
- _this.active = moment__namespace(d);
3257
- }
3258
- else {
3259
- _this.active = moment__namespace(v);
3260
- }
3261
- _this.inp.value = _this.active.format('jYYYY/jMM/jDD');
3262
- _this.inp.search = _this.active.format('jYYYY/jMM/jDD');
3263
- _this.setDate();
3250
+ _this.setInpValue(v);
3264
3251
  };
3265
3252
  this.inp.isValid = function () {
3266
3253
  _this.inp.error = null;
@@ -3296,6 +3283,26 @@
3296
3283
  $__namespace(_this.inputBase.nativeElement).blur();
3297
3284
  };
3298
3285
  };
3286
+ FormDateComponent.prototype.setInpValue = function (v) {
3287
+ console.log(typeof v, 'typeof vtypeof vtypeof vtypeof v');
3288
+ if (v === null) {
3289
+ this.inp.clear();
3290
+ return;
3291
+ }
3292
+ else if (typeof v === 'string') {
3293
+ var d = parseInt(v.substring(6, v.length - 2), 10);
3294
+ this.active = moment__namespace(d);
3295
+ }
3296
+ else if (typeof v === 'number') {
3297
+ this.active = moment__namespace(v);
3298
+ }
3299
+ else {
3300
+ this.active = v;
3301
+ }
3302
+ this.inp.value = this.active.format('jYYYY/jMM/jDD');
3303
+ this.inp.search = this.active.format('jYYYY/jMM/jDD');
3304
+ this.setDate();
3305
+ };
3299
3306
  FormDateComponent.prototype.setDate = function () {
3300
3307
  var n = this.active.clone();
3301
3308
  var countDayInMonth = n.daysInMonth();