ps-toolkit-ui 0.0.65 → 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.
- package/bundles/ps-toolkit-ui.umd.js +21 -15
- 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 +4 -1
- package/esm2015/lib/components/form/date/form.date.component.js +19 -16
- package/fesm2015/ps-toolkit-ui.js +21 -15
- 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
|
@@ -991,6 +991,9 @@
|
|
|
991
991
|
HelperClass.getMoment = function (i, f) {
|
|
992
992
|
if (i === void 0) { i = null; }
|
|
993
993
|
if (f === void 0) { f = null; }
|
|
994
|
+
if (i == null) {
|
|
995
|
+
return moment__namespace();
|
|
996
|
+
}
|
|
994
997
|
return moment__namespace(i, f);
|
|
995
998
|
};
|
|
996
999
|
HelperClass.getDateRemain = function (l, dt) {
|
|
@@ -3242,22 +3245,9 @@
|
|
|
3242
3245
|
else {
|
|
3243
3246
|
this.active = moment__namespace();
|
|
3244
3247
|
}
|
|
3245
|
-
this.
|
|
3248
|
+
this.setInpValue(this.inp.value);
|
|
3246
3249
|
this.inp.setValue = function (v) {
|
|
3247
|
-
|
|
3248
|
-
_this.inp.clear();
|
|
3249
|
-
return;
|
|
3250
|
-
}
|
|
3251
|
-
else if (typeof v === 'string') {
|
|
3252
|
-
var d = parseInt(v.substring(6, v.length - 2), 10);
|
|
3253
|
-
_this.active = moment__namespace(d);
|
|
3254
|
-
}
|
|
3255
|
-
else {
|
|
3256
|
-
_this.active = moment__namespace(v);
|
|
3257
|
-
}
|
|
3258
|
-
_this.inp.value = _this.active.format('jYYYY/jMM/jDD');
|
|
3259
|
-
_this.inp.search = _this.active.format('jYYYY/jMM/jDD');
|
|
3260
|
-
_this.setDate();
|
|
3250
|
+
_this.setInpValue(v);
|
|
3261
3251
|
};
|
|
3262
3252
|
this.inp.isValid = function () {
|
|
3263
3253
|
_this.inp.error = null;
|
|
@@ -3293,6 +3283,22 @@
|
|
|
3293
3283
|
$__namespace(_this.inputBase.nativeElement).blur();
|
|
3294
3284
|
};
|
|
3295
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
|
+
};
|
|
3296
3302
|
FormDateComponent.prototype.setDate = function () {
|
|
3297
3303
|
var n = this.active.clone();
|
|
3298
3304
|
var countDayInMonth = n.daysInMonth();
|