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

Allow showing timezone next to the date in datepicker

Open yedhink opened this issue 1 year ago • 5 comments

@farhanlatheef _a https://yedhin.neetorecord.com/watch/5d9ef276-c52d-4daa-992f-1eba760190e1

Please note: The tooltip is not a solution. One may not hover on top of the due date but rather be quick jump into confusion by seeing the dates. So it's better to always show the timezone next to the date.

cc: @josephmathew900 @praveen-murali-ind @lakshyakanungo

yedhink avatar Mar 28 '24 09:03 yedhink

@yedhink _a https://farhan-ck.neetorecord.com/watch/9d15d88e-0db4-417e-9498-f5c7155ffd99

cc: @praveen-murali-ind

farhanlatheef avatar Mar 28 '24 15:03 farhanlatheef

@farhanlatheef _a That definitely would work. But the thing is, for all neeto products where we are using date-picker, I feel we should be showing the timezone next to the date.

There's already an issue to standardize timezone usage https://github.com/bigbinary/neeto-engineering-web/issues/689. So either browser timezone or neetoAuth timezone will get used.

The idea behind adding this timezone suffix is to bring clarity to the end user in what timezone they are seeing the date.

So this is my suggestion:

  • Have a default icon/tag to display timezone based on the neetoAuth profile timezone. If user has passed in a custom timezone via the timeZone prop, then override default one and show it in the icon/tag.
  • This icon can be display if a prop like say showTimezone is passed to our DatePicker.

Lemme know your thoughts.

yedhink avatar Mar 29 '24 06:03 yedhink

@yedhink https://joseph-mathew.neetorecord.com/watch/8c38ba30-fb85-477e-9e99-2018e9a5709d

If we are showing the timezone next to all date times, we need to consider fields like below as well.

image

josephmathew900 avatar Apr 01 '24 00:04 josephmathew900

@josephmathew900 Mentioning in help doc won't work. Because not everyone remembers everything mentioned in help doc. A person might read a help doc when they start out with the product, but after a while, let's 6 months into it, they might forget minor details. But I agree with your point that showing timezone everywhere is unnecessary.

do we need to show timezone everywhere datetime/time picker is used?

No. Let the host app decide if they need to show it in certain pages. In neetoPlanner when it comes to due date field, it's essential to show timezone. So a prop like showTimezone should do the job.

yedhink avatar Apr 08 '24 15:04 yedhink

@yedhink We can take up this issue once the UI of DatePicker and TimePicker components is finalized in this issue. @AbhayVAshokan is working on that.

But as you mentioned in this comment, we cannot add a logic to display timezone by default from the neetoAuth profile timezone because this is a component library and we cannot integrate neeto specific logic into this. What we can do is to have a timezone prop, and if the product decides to show the timezone they can pass it from the product.

cc: @praveen-murali-ind @farhanlatheef

josephmathew900 avatar Apr 11 '24 07:04 josephmathew900

We will take up this issue after completing https://github.com/bigbinary/neeto-ui/issues/2234.

josephmathew900 avatar Jun 27 '24 05:06 josephmathew900

@gaagul _a

josephmathew900 avatar Jun 28 '24 07:06 josephmathew900

Fixed by: https://github.com/bigbinary/neeto-ui/pull/2239

gaagul avatar Jul 15 '24 14:07 gaagul