ps-toolkit-ui 0.0.67 → 0.0.71
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/bundles/ps-toolkit-ui.umd.js +23 -24
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/helper.class.js +2 -2
- package/esm2015/lib/components/form/date/form.date.component.js +23 -24
- package/fesm2015/ps-toolkit-ui.js +23 -24
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/date/form.date.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -992,7 +992,7 @@
|
|
|
992
992
|
if (i === void 0) { i = null; }
|
|
993
993
|
if (f === void 0) { f = null; }
|
|
994
994
|
if (i == null) {
|
|
995
|
-
return moment__namespace;
|
|
995
|
+
return moment__namespace();
|
|
996
996
|
}
|
|
997
997
|
return moment__namespace(i, f);
|
|
998
998
|
};
|
|
@@ -3237,30 +3237,9 @@
|
|
|
3237
3237
|
this.todayDay = parseInt(today.format('jDD'), 10);
|
|
3238
3238
|
this.todayMonth = parseInt(today.format('jMM'), 10);
|
|
3239
3239
|
this.todayYear = parseInt(today.format('jYYYY'), 10);
|
|
3240
|
-
|
|
3241
|
-
this.active = moment__namespace(this.inp.value);
|
|
3242
|
-
this.inp.value = this.active.format('jYYYY/jMM/jDD');
|
|
3243
|
-
this.inp.search = this.inp.value;
|
|
3244
|
-
}
|
|
3245
|
-
else {
|
|
3246
|
-
this.active = moment__namespace();
|
|
3247
|
-
}
|
|
3248
|
-
this.setDate();
|
|
3240
|
+
this.setInpValue(this.inp.value);
|
|
3249
3241
|
this.inp.setValue = function (v) {
|
|
3250
|
-
|
|
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();
|
|
3242
|
+
_this.setInpValue(v);
|
|
3264
3243
|
};
|
|
3265
3244
|
this.inp.isValid = function () {
|
|
3266
3245
|
_this.inp.error = null;
|
|
@@ -3296,6 +3275,26 @@
|
|
|
3296
3275
|
$__namespace(_this.inputBase.nativeElement).blur();
|
|
3297
3276
|
};
|
|
3298
3277
|
};
|
|
3278
|
+
FormDateComponent.prototype.setInpValue = function (v) {
|
|
3279
|
+
console.log(typeof v, 'typeof vtypeof vtypeof vtypeof v');
|
|
3280
|
+
if (v === null) {
|
|
3281
|
+
this.inp.clear();
|
|
3282
|
+
return;
|
|
3283
|
+
}
|
|
3284
|
+
else if (typeof v === 'string') {
|
|
3285
|
+
var d = parseInt(v.substring(6, v.length - 2), 10);
|
|
3286
|
+
this.active = moment__namespace(d);
|
|
3287
|
+
}
|
|
3288
|
+
else if (typeof v === 'number') {
|
|
3289
|
+
this.active = moment__namespace(v);
|
|
3290
|
+
}
|
|
3291
|
+
else {
|
|
3292
|
+
this.active = v;
|
|
3293
|
+
}
|
|
3294
|
+
this.inp.value = this.active.format('jYYYY/jMM/jDD');
|
|
3295
|
+
this.inp.search = this.active.format('jYYYY/jMM/jDD');
|
|
3296
|
+
this.setDate();
|
|
3297
|
+
};
|
|
3299
3298
|
FormDateComponent.prototype.setDate = function () {
|
|
3300
3299
|
var n = this.active.clone();
|
|
3301
3300
|
var countDayInMonth = n.daysInMonth();
|