Results 1 to 2 of 2

Thread: Formatting list item headers in a grouped list

  1. #1
    Sencha Premium User
    Join Date
    Jul 2014
    Posts
    45

    Default Formatting list item headers in a grouped list

    I am building a dataview.list in a Modern application with grouping on. The list content is driven by a store.

    I want to group by a date field in my item's model. I can simply set the grouper on the store to use the date property but this formats the date in the group header as full date by default. I would like to have control on how the date is displayed such as a simple Dec 9, 2016 or even, in a more complex solution as "today", 'yesterday', '2 days ago', 'last week', etc.

    There is a Ext.dataview.ItemHeader class that, I think can be used, but I can't figure out how to config the list to use a custom header.

    Any directions would be appreciated.

    Thanks

    Eric

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    The header is a config of the item class, which, unfortunately, has been incorrectly marked in the docs as private.

    So, to specify something custom you would use:

    Code:
    itemConfig: {
        header: {
            xtype: 'myheadercls'
        }
    }

Similar Threads

  1. Grouped List showing headers only on move
    By diablo in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 5 Apr 2013, 12:11 AM
  2. Replies: 5
    Last Post: 28 Jan 2013, 8:20 AM
  3. [CLOSED] Multiple redundant headers in Grouped List
    By DrunkenBeard in forum Sencha Touch 2.x: Bugs
    Replies: 1
    Last Post: 17 Oct 2011, 7:08 AM
  4. Can I modify formatting or content for Grouped List Header?
    By djbabylon in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 11 Jan 2011, 2:25 PM
  5. Change Headers on a grouped List?
    By ivanmayes in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 2 Nov 2010, 12:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •