tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.28k stars 1.68k forks source link

date-picker time-zone support #4821

Open lbagic opened 1 year ago

lbagic commented 1 year ago

This function solves the problem (这个功能解决的问题)

Currently, when selecting a date the output will include the time offset from the user's timezone. For e.g., selecting 1970-01-01 from the date picker type date will result in -3600000 if a user is from gmt 2.

I would really like to see timezone support for date-picker (like it was implemented for time-picker https://github.com/tusen-ai/naive-ui/commit/1fa3eb22ef7cbc46a3a06a0d1d5c404f7077c912).

Expected API (期望的 API)

The proposed API would consist of a time-zone property where the user could opt to change how the dates are interpreted/parsed. For e.g. time-zone="UTC"

TheStarryNight1889 commented 1 year ago

I'd like to see this issue resolved. It's a critical feature for a comprehensive date picker.

bladeJumper commented 3 months ago

This is very basic feature and I'm suprised that it is not supported...

WendyHsinYun commented 2 months ago

hope this will be solved soon!