How to display UTC date in range selector Tooltip

Hello,


I want to display, in the tooltip of the range selector, the date in UTC.


My code : 

    tooltip: RangeTooltipSettingsModel = {
        enable: true,
        displayMode: 'Always',
        opacity: 0.6,
        format: 'yyyy/MM/dd, HH:mm:ss',
    };


Date example:  ['2022-01-28T12:00:00.000Z', '2022-01-28T14:30:00.000Z']


Any idea ? Thanks !


4 Replies

SB Swetha Babu Syncfusion Team May 12, 2022 12:41 PM UTC

Hi Julien,


Greetings from Syncfusion.


We can render the tooltip based on your requirement by setting the format property in tooltip as "yyyy/MM/dd HH:mm:ss". We have created a simple angular application to demonstrate the same. Please find the stackblitz link for your sample reference.


Sample link: https://stackblitz.com/edit/angular-4wxj1z?file=app.component.ts


Code Snippet:


<ejs-rangenavigator [tooltip]='tooltip'>

</ejs-rangenavigator>

 

public tooltip: Object = { enable: true, format: 'yyyy/MM/dd HH:mm:ss' , displayMode: 'Always' };

 



Screenshot:



Kindly, revert us if you have any concerns.


Regards,

Swetha



SS Sébastien Sivignon May 13, 2022 05:54 AM UTC

Hello Swetha,


thanks for your answer.

My problem is not to display the date in the tooltip, but to display it in UTC


Regards
Julien



SB Swetha Babu Syncfusion Team May 17, 2022 06:33 AM UTC

Hi Julien,


We are facing an issue in tooltip when trying to achieve your requirement. However, we have considered this as a bug and logged a defect report for the same. The fix for the reported scenario will be included in our upcoming weekly patch release which is expected to be rolled out on 31st May 2022. Please find the below feedback link to keep track of the reported scenario.


Feedback link: https://www.syncfusion.com/feedback/34950/tooltip-is-not-positioned-properly-in-range-navigator


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Regards,

Swetha



SB Swetha Babu Syncfusion Team June 1, 2022 09:25 AM UTC

Hi Julien,


Thank you for your patience.


We can achieve your requirement by using the text argument in tooltipRender event of the Range Navigator. We have created a simple angular application to demonstrate the same. Please find the below stackblitz link for your reference.


Sample link: https://stackblitz.com/edit/angular-4wxj1z-sg7r1k?file=app.component.ts


Code Snippet:


<ejs-rangenavigator id='defaultRn' (tooltipRender)="tooltipRender($event)">

</ejs-rangenavigator>

 

public tooltipRender(args: IRangeTooltipRenderEventArgs) {

    args.text[0] = new Date(args.text[0]).toUTCString();

  }


Screenshot:



Kindly, revert us if you have any concerns.


Regards,

Swetha


Loader.
Up arrow icon