LiveTable filter by date

Last modified by Alex Cotiugă on 2022/10/31 00:09

cogAdd date picker to LiveTable in order to filter by Date
TypeXAR
Category
Developed by

Zoubir Medjdoub

Active Installs8
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

Since 9.5RC1, the livetable macro supports filtering on dates out of the box using the `date` type. Please refer to the documentation.

This extension contain a xar that allow you to filter by date in the livetable, once you click on the concerned field (specified by "type": "datetime"), a datepicker will be displayed in order to filter, you can see this in the screen above : 

LiveTable-FilterDate.png

Example

  
{{include document="XWiki.LiveTableCustom" /}}
{{velocity}}
#set ($columnsProperties = {
 'doc.name': {"type":"text","size":10,"link":"view"},
 'doc.space': {"type":"text","size":20,"link":"view"},
 'doc.author': {"type":"text","size":10},
 'doc.date': {"type":"datetime","size":10}
})
#set ($options = {
 'translationPrefix' : 'platform.index.',
 'selectedColumn': 'doc.date',
 'defaultOrder': 'desc'
})
#set ($columns = ['doc.name', 'doc.space', 'doc.author', 'doc.date'])
#livetableCustom('livetabledate' $columns $columnsProperties $options)

{{/velocity}}
Tags: livetable
    

Get Connected