components icon indicating copy to clipboard operation
components copied to clipboard

[Feature Request]: Expose more configurable option in relative range value

Open phuongdnguyen opened this issue 2 years ago • 3 comments

Description

For this component. It would be nice if relative range value is more configurable. For example, the relative range don't have to be "in the past", it can be range in the future: now + 1 hour, ...

Code of Conduct

phuongdnguyen avatar Apr 22 '24 03:04 phuongdnguyen

Though we don't have any existing designs for that, this does look like something you can do already! You will have to provide your own overrides for i18nStrings (e.g. i18nStrings.formatRelativeRange) to say "next" instead of "last", but the value you get in your onChange handler just includes the unit and the value, which you can treat as future units.

avinashbot avatar May 06 '24 11:05 avinashbot

Though we don't have any existing designs for that, this does look like something you can do already! You will have to provide your own overrides for i18nStrings (e.g. i18nStrings.formatRelativeRange) to say "next" instead of "last", but the value you get in your onChange handler just includes the unit and the value, which you can treat as future units.

Thanks, i will try it and let you known the result.

phuongdnguyen avatar May 06 '24 12:05 phuongdnguyen

Thanks, the work around works for me.

phuongdnguyen avatar May 07 '24 02:05 phuongdnguyen

I will leave this one open since you've already assigned yourself @avinashbot

phuongdnguyen avatar May 07 '24 03:05 phuongdnguyen