Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: input[type=date], the modifier number could converted to a timestamp #12396

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

shengxj1
Copy link

@shengxj1 shengxj1 commented Nov 14, 2024

when an input element with type="date" or "datetime-local", the modifier number converts 2023-07-01T20:00 and 2023-07-01 to 2023, which is a bit odd and would make sense if it could be converted to a timestamp

String(new Date())
> 'Sat Jul 01 2023 22:19:11 GMT+0800 (China Standard Time)'
Number(new Date())
> 1688221156086

Preview

@edison1105 edison1105 added scope: v-model wait changes 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Nov 15, 2024
Copy link

github-actions bot commented Nov 18, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB (+203 B) 38 kB (+76 B) 34.3 kB (+49 B)
vue.global.prod.js 158 kB (+203 B) 57.9 kB (+73 B) 51.5 kB (+95 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47.2 kB 18.3 kB 16.8 kB
createApp 55.2 kB 21.3 kB 19.5 kB
createSSRApp 59.3 kB 23.1 kB 21 kB
defineCustomElement 60.1 kB 22.9 kB 20.8 kB
overall 69.1 kB 26.5 kB 24.1 kB

Copy link

pkg-pr-new bot commented Nov 18, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12396

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12396

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12396

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12396

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12396

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12396

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12396

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12396

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12396

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12396

vue

pnpm add https://pkg.pr.new/vue@12396

commit: ad5df12

@edison1105
Copy link
Member

there is a warning when changing the input date.

  • open Playground
  • change date and observe the Console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope: v-model wait changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants