ui-grid
ui-grid copied to clipboard
cellTooltip not working correctly when cellFilter has just date format
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
you will basically have to add a function
ex.
cellTooltip: function(row, col) { return moment(row.entity.mixedDate); }
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.
Yes me too, the tool tip function calls are not working, if the column type is date and cellFilter date format is used.
Yes me too facing the same issue. Is this issue fixed in any newer version?
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.
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 };
????????????????????????
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
use single quote instead
cellFilter: "date:'dd-MM-yyyy HH:mm:ss'"