forked from MapComplete/MapComplete
		
	Add filters
This commit is contained in:
		
							parent
							
								
									965faca0e5
								
							
						
					
					
						commit
						42a6b37ca6
					
				
					 13 changed files with 287 additions and 219 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
|  | @ -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 { | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue