Author Topic: Grouping formatted dates with paramquery pro 3.3.5  (Read 2045 times)

WTC_User

  • Pro OEM
  • Newbie
  • *
  • Posts: 18
    • View Profile
Grouping formatted dates with paramquery pro 3.3.5
« on: October 02, 2017, 09:01:55 pm »
Referring to this example: https://paramquery.com/pro/demos/group_rows

I have to group rows by shipping date columns, but the dates must be formatted...so, add in the date column the italian format (it's an example).

The shipping date column going to be like this:

    { title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date", format: "dd/mm/yy" }

When I group by this column I will see the group date isn't formatted like rows...It's a bug or there is a configuration that resolve this problem?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Grouping formatted dates with paramquery pro 3.3.5
« Reply #1 on: October 02, 2017, 10:36:22 pm »
That seems like an issue.

It can be resolved by using a titleRenderer in groupModel.

Code: [Select]
function titleRenderer(ui){
return ui.formatVal + " ("+ui.rowData.pq_items+")";
}

and in groupModel.title use

Code: [Select]
        var groupModel = {
            on: true,
            title: [
titleRenderer,
                titleRenderer
            ],
            .... other properties..
        };

WTC_User

  • Pro OEM
  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Grouping formatted dates with paramquery pro 3.3.5
« Reply #2 on: October 03, 2017, 12:26:38 pm »
Thank U!
This will be the corrective way (but not correct)...So I've used titleDefault option because the date group can be in any position..