ps-toolkit-ui 0.0.68 → 0.0.72

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();
@@ -3240,30 +3237,12 @@
3240
3237
  this.todayDay = parseInt(today.format('jDD'), 10);
3241
3238
  this.todayMonth = parseInt(today.format('jMM'), 10);
3242
3239
  this.todayYear = parseInt(today.format('jYYYY'), 10);
3243
- if (this.inp.value) {
3244
- this.active = moment__namespace(this.inp.value);
3245
- this.inp.value = this.active.format('jYYYY/jMM/jDD');
3246
- this.inp.search = this.inp.value;
3247
- }
3248
- else {
3249
- this.active = moment__namespace();
3250
- }
3251
- this.setDate();
3240
+ console.log(44444444444);
3241
+ console.log(this.inp.value);
3242
+ console.log(typeof this.inp.value);
3243
+ this.setInpValue(this.inp.value);
3252
3244
  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();
3245
+ _this.setInpValue(v);
3267
3246
  };
3268
3247
  this.inp.isValid = function () {
3269
3248
  _this.inp.error = null;
@@ -3299,6 +3278,26 @@
3299
3278
  $__namespace(_this.inputBase.nativeElement).blur();
3300
3279
  };
3301
3280
  };
3281
+ FormDateComponent.prototype.setInpValue = function (v) {
3282
+ console.log(typeof v, 'typeof vtypeof vtypeof vtypeof v');
3283
+ if (v === null) {
3284
+ this.inp.clear();
3285
+ return;
3286
+ }
3287
+ else if (typeof v === 'string') {
3288
+ var d = parseInt(v.substring(6, v.length - 2), 10);
3289
+ this.active = moment__namespace(d);
3290
+ }
3291
+ else if (typeof v === 'number') {
3292
+ this.active = moment__namespace(v);
3293
+ }
3294
+ else {
3295
+ this.active = v;
3296
+ }
3297
+ this.inp.value = this.active.format('jYYYY/jMM/jDD');
3298
+ this.inp.search = this.active.format('jYYYY/jMM/jDD');
3299
+ this.setDate();
3300
+ };
3302
3301
  FormDateComponent.prototype.setDate = function () {
3303
3302
  var n = this.active.clone();
3304
3303
  var countDayInMonth = n.daysInMonth();