Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(geo): ensure ogc filter accept today and now #1622

Merged
merged 9 commits into from
May 15, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class OgcFilterTimeComponent implements OnInit {
}

changeTemporalProperty(value, position?, refreshFilter = true) {
alecarn marked this conversation as resolved.
Show resolved Hide resolved
if (!this.isValidDate(value)) {
if (!moment(value, ['MM/DD/YYYY']).isValid()) {
return;
}
let valueTmp = this.getDateTime(value, position);
Expand Down Expand Up @@ -746,8 +746,4 @@ export class OgcFilterTimeComponent implements OnInit {
this.setFilterStateDisable();
this.updateValues();
}

private isValidDate(date: Date) {
return date instanceof Date && !isNaN(date.getTime());
}
}
Loading