Add filters

This commit is contained in:
Pieter Vander Vennet 2022-01-08 22:11:24 +01:00
parent 965faca0e5
commit 42a6b37ca6
13 changed files with 287 additions and 219 deletions

View file

@ -195,7 +195,7 @@ export default class FilterView extends VariableUiElement {
}
const props = properties.data
// Replace all the field occurences in the tags...
const tagsSpec = Utils.WalkJson(filter.originalTagsSpec,
const tagsSpec = Utils.WalkJson(filter.originalTagsSpec,
v => {
if (typeof v !== "string") {
return v

View file

@ -35,7 +35,7 @@ export default class SimpleDatePicker extends InputElement<string> {
}
IsValid(t: string): boolean {
return false;
return !isNaN(new Date(t).getTime());
}
protected InnerConstructElement(): HTMLElement {

View file

@ -206,8 +206,7 @@ export default class ValidatedTextField {
"date",
"A date",
(str) => {
const time = Date.parse(str);
return !isNaN(time);
return !isNaN(new Date(str).getTime());
},
(str) => {
const d = new Date(str);