mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	added date and time attribute capability
This commit is contained in:
		
							parent
							
								
									05d2f4fe96
								
							
						
					
					
						commit
						7d6c847d47
					
				| @ -6,7 +6,7 @@ function parse(value) { | |||||||
|         if (token === 'promoted') { |         if (token === 'promoted') { | ||||||
|             defObj.isPromoted = true; |             defObj.isPromoted = true; | ||||||
|         } |         } | ||||||
|         else if (['text', 'number', 'boolean', 'date', 'url'].includes(token)) { |         else if (['text', 'number', 'boolean', 'date', 'datetime', 'url'].includes(token)) { | ||||||
|             defObj.labelType = token; |             defObj.labelType = token; | ||||||
|         } |         } | ||||||
|         else if (['single', 'multi'].includes(token)) { |         else if (['single', 'multi'].includes(token)) { | ||||||
|  | |||||||
| @ -115,6 +115,7 @@ const TPL = ` | |||||||
|                   <option value="number">Number</option> |                   <option value="number">Number</option> | ||||||
|                   <option value="boolean">Boolean</option> |                   <option value="boolean">Boolean</option> | ||||||
|                   <option value="date">Date</option> |                   <option value="date">Date</option> | ||||||
|  |                   <option value="datetime">Datetime</option> | ||||||
|                   <option value="url">URL</option> |                   <option value="url">URL</option> | ||||||
|                 </select> |                 </select> | ||||||
|             </td> |             </td> | ||||||
|  | |||||||
| @ -197,6 +197,9 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget { | |||||||
|             else if (definition.labelType === 'date') { |             else if (definition.labelType === 'date') { | ||||||
|                 $input.prop("type", "date"); |                 $input.prop("type", "date"); | ||||||
|             } |             } | ||||||
|  |             else if (definition.labelType === 'datetime') { | ||||||
|  |                 $input.prop('type', 'datetime-local') | ||||||
|  |             } | ||||||
|             else if (definition.labelType === 'url') { |             else if (definition.labelType === 'url') { | ||||||
|                 $input.prop("placeholder", "http://website..."); |                 $input.prop("placeholder", "http://website..."); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 harishkumarchellappa
						harishkumarchellappa