ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

cellTooltip not working correctly when cellFilter has just date format

Open venkat17 opened this issue 8 years ago • 8 comments

Please make sure each of the following is true before submitting a new issue. We are a small team with limited time and it is very difficult to manage issues if they aren't reported correctly.

  • [x] This is a bug report, not a question on how to use the grid.
    Use Stack Overflow or Gitter for questions.
  • [x] You have searched the open issues to see if this bug has been filed before. We don't want duplicate issues.
  • [x] You have reviewed the tutorials and documentation to ensure you are using the grid correctly. ui-grid.info
  • [x] You are using the latest version of the grid. Older versions are not patched or supported.
  • [x] You have provided steps to recreate your bug. A plunkr is even better.

If I give dateformat string and set cellTooltip: true, the tooltip is not displaying correctly. For example: { field: 'mixedDate', displayName: "Cust Date", cellFilter: 'date:"dd-MM-yyyy HH:mm:ss"', filterCellFiltered:true, cellTooltip: true, width: '30%'}

As showing in the given plunker http://plnkr.co/edit/Olv74Y83jUaXQBvv8Mpg?p=preview

venkat17 avatar Mar 17 '16 16:03 venkat17

you will basically have to add a function ex. cellTooltip: function(row, col) { return moment(row.entity.mixedDate); }

angular-git-user avatar Mar 21 '16 12:03 angular-git-user

ran into same issue. cellTooltip function will not get called if function is defiend for tooltip. i tried below options. { field: 'mixedDate', displayName: "Cust Date", type:"date", cellFilter: 'date:"dd-MM-yyyy HH:mm:ss"', filterCellFiltered:true, cellTooltip: function(row, col) { return moment(row.entity.mixedDate); }, width: '30%'}

with or without type, got same output.

kkankala avatar Mar 31 '16 17:03 kkankala

Yes me too, the tool tip function calls are not working, if the column type is date and cellFilter date format is used.

venkat17 avatar Apr 01 '16 15:04 venkat17

Yes me too facing the same issue. Is this issue fixed in any newer version?

yogeshkumarpa avatar May 25 '16 06:05 yogeshkumarpa

I ran into the same issue that is not an issue actually... I'd like to display a date in one format in the cell and in another one in the tooltip, unfortunately, this is not possible as long as you defined a cellFilter:

Tooltips respect the cellFilter, so if you define a cellFilter it will also be used in the tooltip.

Tutorial: 117 Tooltips

cmorgant avatar Jul 08 '16 16:07 cmorgant

hi, when i use cellFilter, the cellTooltip don't work exemple :
{field: 'countryId', displayName: 'Location', enableCellEdit: true, editableCellTemplate:'uigrid/dropdownEditor', cellFilter:"griddropdown:editDropdownOptionsArray:editDropdownIdLabel:editDropdownValueLabel:row.entity.country",editDropdownIdLabel: 'Key', editDropdownValueLabel: "Value" cellTooltip: function (row, col) { return 'Created : ' + row.entity.createDate + ' by: ' + row.entity.createUser }; ????????????????????????

Sabri55 avatar Sep 22 '16 15:09 Sabri55

This is not the final solution but at least works:

{ field: 'mixedDate', displayName: "Cust Date", cellFilter: 'date:"dd-MM-yyyy HH:mm:ss"', filterCellFiltered:true, cellTooltip: true, width: '30%'}

by

{ field: 'mixedDate', displayName: "Cust Date", cellFilter: 'date:\'dd-MM-yyyy HH:mm:ss\'', filterCellFiltered:true, cellTooltip: true, width: '30%'}

Here is a plunkr with my working "solution" http://plnkr.co/edit/mLk8FcfiyXIZTp1bKpAZ?p=preview

csrar avatar Nov 22 '16 15:11 csrar

use single quote instead

cellFilter: "date:'dd-MM-yyyy HH:mm:ss'"

freedomlang avatar Mar 06 '20 08:03 freedomlang