Use datetime-local input, support clear button, show expiration time with minutes#1431
Use datetime-local input, support clear button, show expiration time with minutes#1431Sinaloense wants to merge 3 commits into
Conversation
…button, show expiration time with minutes
|
I don't think storing in UTC is the right approach. I think what we should do is send full ISO time with the timezone, like we do in other places, like reports. |
|
I realized I incorrectly named this as "UTC", when in fact it's being sent as an ISO. But I now see this can be simplified by using dayjs().format() I’ve made the changes, please review it when you have time. |
|
I have now reverted to using The issue was caused by using an input of type |
|
I would prefer to keep the date only. Sounds like the right fix would be to just format the date in a full ISO format. That way timezone info will be preserved. |
Problem explanation:
07/08/20252025-07-08 00:00:00formatTime(item.expirationTime, 'date'), it appears as07/07/2025(one day earlier).Solution:
Store the date always in UTC to avoid timezone-related mismatches.Change input date to datetime-local.
Change the input to datetime-local to support hours and minutes.

PC:
Android:

Bonus:
Add support for the Clear button, which now properly set the field to

01/01/2099 12:00 AMand value tonull.Show the expiration date with hours and minutes in the table.
