Fix on date
This commit is contained in:
@@ -104,7 +104,7 @@ export class ListOfTunnelFlightsComponent implements OnInit {
|
||||
this.isLoading = true;
|
||||
|
||||
// Get data to show in a table
|
||||
let endDate = this.dateService.addMonths(new Date(), 2);
|
||||
let endDate = new Date();
|
||||
endDate.setHours(0, 0, 0, 0);
|
||||
let beginDate = this.computeBeginDateByPeriod(this.selectedPeriod, endDate);
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ export class NewJumpComponent implements OnInit {
|
||||
private countDatasLoaded: number;
|
||||
private pendingAddRequest: boolean;
|
||||
private listOfDropZone: Array<DropZoneResp>;
|
||||
public maxDate: Date;
|
||||
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private serviceJump: JumpService,
|
||||
@@ -82,6 +83,8 @@ export class NewJumpComponent implements OnInit {
|
||||
});
|
||||
this.updateTitle();
|
||||
|
||||
this.maxDate = this.dateService.addDays(new Date(), 1);
|
||||
|
||||
this.pendingAddRequest = false;
|
||||
this.initForm();
|
||||
this.getListOfJumpTypes();
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'NewTunnelFlight_Date_Lbl' | translate }}</mat-label>
|
||||
<input matInput [matDatepicker]="flightDateDp" [(ngModel)]="flightDate" name="flightDate" disabled>
|
||||
<input matInput [max]="maxDate" [matDatepicker]="flightDateDp" [(ngModel)]="flightDate" name="flightDate" disabled>
|
||||
<mat-datepicker-toggle matSuffix [for]="flightDateDp"></mat-datepicker-toggle>
|
||||
<mat-datepicker #flightDateDp disabled="false"></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -8,9 +8,9 @@ import { TunnelResp } from "../../models/tunnel";
|
||||
import { JumpTypeResp } from "../../models/jumpType";
|
||||
import { TunnelService } from '../../services/tunnel.service';
|
||||
import { ServiceComm } from '../../services/service-comm.service';
|
||||
import { StatsService } from '../../services/stats.service';
|
||||
import { TunnelFlightService } from "../../services/tunnel-flight.service";
|
||||
import { JumpTypeService } from "../../services/jump-type.service";
|
||||
import { DateService } from "src/services/date.service";
|
||||
|
||||
export const PICK_FORMATS = {
|
||||
parse: { dateInput: 'yy MM dd' },
|
||||
@@ -48,12 +48,14 @@ export class NewTunnelFlightComponent implements OnInit {
|
||||
private countDatasLoaded: number;
|
||||
private pendingAddRequest: boolean;
|
||||
public listOfJumpType: Array<JumpTypeResp>;
|
||||
public maxDate: Date;
|
||||
|
||||
constructor(private serviceComm: ServiceComm,
|
||||
private serviceTunnel: TunnelService,
|
||||
private serviceTunnelFlight: TunnelFlightService,
|
||||
private serviceJumpType: JumpTypeService,
|
||||
private translateService: TranslateService) { }
|
||||
private translateService: TranslateService,
|
||||
private dateService: DateService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.serviceComm.forceTranslateTitle.subscribe((data) => {
|
||||
@@ -63,6 +65,7 @@ export class NewTunnelFlightComponent implements OnInit {
|
||||
});
|
||||
this.updateTitle();
|
||||
|
||||
this.maxDate = this.dateService.addDays(new Date(), 1);
|
||||
this.countDatasLoaded = 0;
|
||||
this.pendingAddRequest = false;
|
||||
this.initForm();
|
||||
|
||||
Reference in New Issue
Block a user