Do not convert date if already a date
This commit is contained in:
		
							parent
							
								
									f7a019ed83
								
							
						
					
					
						commit
						e46f4bf01e
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -675,6 +675,9 @@ class AlchemyDateFilter(AlchemyGridFilter): | |||
|         Convert user input to a proper ``datetime.date`` object. | ||||
|         """ | ||||
|         if value: | ||||
|             if isinstance(value, datetime.date): | ||||
|                 return value | ||||
| 
 | ||||
|             try: | ||||
|                 dt = datetime.datetime.strptime(value, '%Y-%m-%d') | ||||
|             except ValueError: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar