@fluxhub/fluxhub-lib 1.0.421 → 1.0.423
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/fluxhub-fluxhub-lib.umd.js +61 -8
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhdatepicker.js +39 -8
- package/esm2015/lib/controls/utils/MomentDateAdapter.js +22 -2
- package/esm5/lib/controls/fhdatepicker.js +44 -9
- package/esm5/lib/controls/utils/MomentDateAdapter.js +22 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +58 -8
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +62 -9
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhdatepicker.d.ts +2 -1
- package/package.json +1 -1
|
@@ -9198,17 +9198,37 @@
|
|
|
9198
9198
|
* @return {?}
|
|
9199
9199
|
*/
|
|
9200
9200
|
function (value, parseFormat) {
|
|
9201
|
+
console.log('prima value ', value, 'parseFormat ', parseFormat);
|
|
9201
9202
|
if (value != null) {
|
|
9202
9203
|
/** @type {?} */
|
|
9203
9204
|
var arr = value.split('/');
|
|
9205
|
+
console.log('arr ', arr);
|
|
9204
9206
|
if (arr.length == 3) {
|
|
9207
|
+
/** @type {?} */
|
|
9208
|
+
var yy = parseInt(arr[2]);
|
|
9209
|
+
if (yy < 100)
|
|
9210
|
+
yy += 2000;
|
|
9211
|
+
if (arr[1].length == 1)
|
|
9212
|
+
arr[1] = "0" + arr[1];
|
|
9213
|
+
if (arr[0].length == 1)
|
|
9214
|
+
arr[0] = "0" + arr[0];
|
|
9215
|
+
value = arr[0] + "/" + arr[1] + "/" + yy;
|
|
9216
|
+
}
|
|
9217
|
+
arr = value.split('-');
|
|
9218
|
+
console.log('arr ', arr);
|
|
9219
|
+
if (arr.length == 3) {
|
|
9220
|
+
/** @type {?} */
|
|
9221
|
+
var yy = parseInt(arr[2]);
|
|
9222
|
+
if (yy < 100)
|
|
9223
|
+
yy += 2000;
|
|
9205
9224
|
if (arr[1].length == 1)
|
|
9206
9225
|
arr[1] = "0" + arr[1];
|
|
9207
9226
|
if (arr[0].length == 1)
|
|
9208
9227
|
arr[0] = "0" + arr[0];
|
|
9209
|
-
value = arr[0] + "/" + arr[1] + "/" +
|
|
9228
|
+
value = arr[0] + "/" + arr[1] + "/" + yy;
|
|
9210
9229
|
}
|
|
9211
9230
|
}
|
|
9231
|
+
console.log('fine value ', value, 'parseFormat ', parseFormat);
|
|
9212
9232
|
/** @type {?} */
|
|
9213
9233
|
var m = moment(value, parseFormat, true);
|
|
9214
9234
|
if (!m.isValid()) {
|
|
@@ -9415,20 +9435,52 @@
|
|
|
9415
9435
|
_this.v_view = _this.uti_s.date2String(new Date());
|
|
9416
9436
|
_this.date_sel = null;
|
|
9417
9437
|
_this.v_date_sel = "";
|
|
9418
|
-
_this.dateAdapter.setLocale('it');
|
|
9438
|
+
_this.dateAdapter.setLocale('it-IT');
|
|
9419
9439
|
return _this;
|
|
9420
9440
|
}
|
|
9421
9441
|
/**
|
|
9422
|
-
* @param {?}
|
|
9442
|
+
* @param {?} ob
|
|
9443
|
+
* @return {?}
|
|
9444
|
+
*/
|
|
9445
|
+
FHDatePickerComponent.prototype.checkInput = /**
|
|
9446
|
+
* @param {?} ob
|
|
9447
|
+
* @return {?}
|
|
9448
|
+
*/
|
|
9449
|
+
function (ob) {
|
|
9450
|
+
console.log('ob ', ob);
|
|
9451
|
+
console.log('date_sel ', this.date_sel);
|
|
9452
|
+
/* if(ob.key=='-')
|
|
9453
|
+
{
|
|
9454
|
+
ob.preventDefault();
|
|
9455
|
+
//this.date_sel+=this.date_sel+'/';
|
|
9456
|
+
this.pickerId.nativeElement.value=this.pickerId.nativeElement.value.split('-').join('/');
|
|
9457
|
+
|
|
9458
|
+
}
|
|
9459
|
+
let arr: Array<string> = this.pickerId.nativeElement.value.split('-').join('/').split('/');
|
|
9460
|
+
console.log(arr);
|
|
9461
|
+
if (arr.length == 3) {
|
|
9462
|
+
let yy=parseInt(arr[2]);
|
|
9463
|
+
|
|
9464
|
+
if(yy<25 && yy!=20){yy+=2000;
|
|
9465
|
+
this.pickerId.nativeElement.value=arr[0]+'/'+arr[1]+'/'+yy;}
|
|
9466
|
+
}*/
|
|
9467
|
+
};
|
|
9468
|
+
/**
|
|
9469
|
+
* @param {?} event
|
|
9423
9470
|
* @return {?}
|
|
9424
9471
|
*/
|
|
9425
9472
|
FHDatePickerComponent.prototype.dt_chg = /**
|
|
9426
|
-
* @param {?}
|
|
9473
|
+
* @param {?} event
|
|
9427
9474
|
* @return {?}
|
|
9428
9475
|
*/
|
|
9429
|
-
function (
|
|
9476
|
+
function (event) {
|
|
9477
|
+
console.log('event ', event);
|
|
9478
|
+
/** @type {?} */
|
|
9479
|
+
var s = event.target.value;
|
|
9480
|
+
console.log('s -> ', s);
|
|
9430
9481
|
/** @type {?} */
|
|
9431
9482
|
var arr = s.split('-').join('/').split('/');
|
|
9483
|
+
console.log('arr ', arr);
|
|
9432
9484
|
if (arr.length == 3) {
|
|
9433
9485
|
if (arr[1].length == 1)
|
|
9434
9486
|
arr[1] = "0" + arr[1];
|
|
@@ -9514,7 +9566,6 @@
|
|
|
9514
9566
|
* @return {?}
|
|
9515
9567
|
*/
|
|
9516
9568
|
function () {
|
|
9517
|
-
console.log(_this.date_sel);
|
|
9518
9569
|
_this.ch();
|
|
9519
9570
|
}), 50);
|
|
9520
9571
|
};
|
|
@@ -9610,7 +9661,8 @@
|
|
|
9610
9661
|
* @return {?}
|
|
9611
9662
|
*/
|
|
9612
9663
|
function (d) {
|
|
9613
|
-
|
|
9664
|
+
console.log('d ', d);
|
|
9665
|
+
this.dateAdapter.setLocale('it-IT');
|
|
9614
9666
|
if (d == null) {
|
|
9615
9667
|
this.date_sel = null;
|
|
9616
9668
|
return;
|
|
@@ -9632,8 +9684,9 @@
|
|
|
9632
9684
|
{ provide: material.MAT_DATE_FORMATS, useValue: ɵ0 },
|
|
9633
9685
|
{ provide: material.DateAdapter, useClass: MomentDateAdapter },
|
|
9634
9686
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent, multi: true },
|
|
9687
|
+
{ provide: material.MAT_DATE_LOCALE, useValue: 'it-IT' },
|
|
9635
9688
|
],
|
|
9636
|
-
template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch( $event)\" (focusout)=\"dt_chg($event
|
|
9689
|
+
template: "\n <div [hidden]=\"!show_buttons||!enabled\">\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"add_year()\">+1 Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"ini_year()\">Inizio Anno</button>\n <button mat-flat-button style=\"background-color: #F5F5F5\" (click)=\"fin_year()\">Fine Anno</button>\n </div>\n\n <mat-form-field (click)=\"chxx($event)\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input [disabled]=\"!enabled\" #pickerId (dateChange)=\"ch( $event)\" (focusout)=\"dt_chg($event)\" (keyup)=\"checkInput($event)\"\n (click)=\"chxx($event)\" [(ngModel)]=\"date_sel\" matInput [matDatepicker]=\"picker\" >\n <mat-datepicker-toggle matSuffix [for]=\"picker\" (click)=\"chxx($event)\"></mat-datepicker-toggle>\n <mat-datepicker (click)=\"chxx($event)\" #picker></mat-datepicker>\n </mat-form-field>\n\n ",
|
|
9637
9690
|
styles: ["\n .lb_small_grigia {\n font-size: 12px;\n color: #B8B8B8;\n }\n\n .label_dis {\n font-size: 14px;\n font-weight: bold;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-input-element,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-label {\n color: #f44336;\n }\n\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-underline,\n :host.ng-invalid > .ng-touched ::ng-deep .mat-form-field-ripple {\n background-color: #f44336;\n }\n "]
|
|
9638
9691
|
}] }
|
|
9639
9692
|
];
|