Error grouping by formated date column in react

Hello,

I am trying to group by a date formated column and I get the error: 

Uncaught TypeError: value.getDate is not a function
    at date-formatter.js:99
    at Object.ValueFormatter.toView (value-formatter.js:49)
    at Data.formatGroupColumn (data.js:394)
    at _loop_2 (util.js:157)
    at Function.DataUtil.group (util.js:178)
    at JsonAdaptor.onGroup (adaptors.js:234)
    at JsonAdaptor.processQuery (adaptors.js:91)
    at DataManager.executeLocal (manager.js:121)

Grouping by other columns works OK.

Column declaration:

var groupOptionsGroupSettingsModel = {
    showDropArea: true,
    showGroupedColumn: true,
  };

var dateFormatobject = {type:'date'format:'dd/MM/yyyy'};

<GridComponent
...
  allowGrouping={true}
  groupSettings={groupOptions}
...
 >
  <ColumnsDirective>
<ColumnDirective
   field='activityTime'
   headerText='Time'
   type='date'
   format={dateFormat}
   enableGroupByFormat={true}
></ColumnDirective>

Thanks in advance,
Robert

1 Reply

RS Rajapandiyan Settu Syncfusion Team July 3, 2020 05:58 AM UTC

Hi Robert, 

Greetings from syncfusion support. 

Query : I am trying to group by a date formated column and I get the error:. 

We are unable to reproduce the reported problem at our end, grouping date formatted column is working fine. Refer the below sample for more information. 


If you still face the same problem, please share the below details to find the root cause. 

  1. Share the full code you have used.
  2. Share the packages version of syncfusion controls you have used.
  3. Which type of datasource you used? Local/remote (share the adaptor details)
  4. Share screenshot (or) example code of datasource for that date column
  5. If possible share the issue reproduced sample (or) make the issue in the given sample and share with us.

Regards, 
Rajapandiyan S 


Loader.
Up arrow icon