Всякий раз, когда я пытаюсь вызвать веб-API, используя значение из datepicker, оно странным образом отображает дату, что приводит к неправильному запросу с сервера.
GET https://lihcode -lufthansa-open-new-v1.p.mashape.com / v1 / операций / расписаний / sfo / bom / 1542738600000? Limit = 10 400 (неверный запрос).
Here date is 154273860000, but I want date in 2018-11-20(yyyy-mm-dd).
и вот мой компонент html для даты.
<input required matInput #input maxlength="3"
name="destination" placeholder="Enter destination"
class="form-control
[(ngModel)]="flightSchedule.destination">
<mat-hint align="end">Destination airport.
</mat-form-field>
и мой модальный класс:
export class FlightSchedule {
constructor(
public destination: string,
public origin: string,
public date: string,
public limit: string
) {}
}
Мне нужна помощь, пожалуйста, кто-нибудь, помогите мне
Заранее спасибо