@fluxhub/fluxhub-lib 1.0.421 → 1.0.422

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.
@@ -9415,20 +9415,42 @@
9415
9415
  _this.v_view = _this.uti_s.date2String(new Date());
9416
9416
  _this.date_sel = null;
9417
9417
  _this.v_date_sel = "";
9418
- _this.dateAdapter.setLocale('it');
9418
+ _this.dateAdapter.setLocale('it-IT');
9419
9419
  return _this;
9420
9420
  }
9421
9421
  /**
9422
- * @param {?} s
9422
+ * @param {?} ob
9423
+ * @return {?}
9424
+ */
9425
+ FHDatePickerComponent.prototype.checkInput = /**
9426
+ * @param {?} ob
9427
+ * @return {?}
9428
+ */
9429
+ function (ob) {
9430
+ console.log('ob ', ob);
9431
+ console.log('date_sel ', this.date_sel);
9432
+ if (ob.key == '-') {
9433
+ ob.preventDefault();
9434
+ //this.date_sel+=this.date_sel+'/';
9435
+ this.pickerId.nativeElement.value = this.pickerId.nativeElement.value.split('-').join('/');
9436
+ }
9437
+ };
9438
+ /**
9439
+ * @param {?} event
9423
9440
  * @return {?}
9424
9441
  */
9425
9442
  FHDatePickerComponent.prototype.dt_chg = /**
9426
- * @param {?} s
9443
+ * @param {?} event
9427
9444
  * @return {?}
9428
9445
  */
9429
- function (s) {
9446
+ function (event) {
9447
+ console.log('event ', event);
9448
+ /** @type {?} */
9449
+ var s = event.target.value;
9450
+ console.log('s -> ', s);
9430
9451
  /** @type {?} */
9431
9452
  var arr = s.split('-').join('/').split('/');
9453
+ console.log('arr ', arr);
9432
9454
  if (arr.length == 3) {
9433
9455
  if (arr[1].length == 1)
9434
9456
  arr[1] = "0" + arr[1];
@@ -9514,7 +9536,6 @@
9514
9536
  * @return {?}
9515
9537
  */
9516
9538
  function () {
9517
- console.log(_this.date_sel);
9518
9539
  _this.ch();
9519
9540
  }), 50);
9520
9541
  };
@@ -9610,7 +9631,8 @@
9610
9631
  * @return {?}
9611
9632
  */
9612
9633
  function (d) {
9613
- this.dateAdapter.setLocale('it');
9634
+ console.log('d ', d);
9635
+ this.dateAdapter.setLocale('it-IT');
9614
9636
  if (d == null) {
9615
9637
  this.date_sel = null;
9616
9638
  return;
@@ -9632,8 +9654,9 @@
9632
9654
  { provide: material.MAT_DATE_FORMATS, useValue: ɵ0 },
9633
9655
  { provide: material.DateAdapter, useClass: MomentDateAdapter },
9634
9656
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: FHDatePickerComponent, multi: true },
9657
+ { provide: material.MAT_DATE_LOCALE, useValue: 'it-IT' },
9635
9658
  ],
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.target.value)\"\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 ",
9659
+ 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
9660
  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
9661
  }] }
9639
9662
  ];