mskocik / svelty-picker

Simple date & time picker in svelte
https://mskocik.github.io/svelty-picker/
202 stars 46 forks source link

Support for ISO Dates #126

Open xpluscal opened 1 year ago

xpluscal commented 1 year ago

A often used standard format, e.g. in DBs is the ISO string, e.g.:

2023-07-20T09:35:00.000Z

How would you achieve this as input format for the picker at the moment?

mskocik commented 1 year ago

It's not possible to parse this date string because of miliseconds part at the moment. Maybe it's a bug in current implementation. But if you strip seconds and miliseconds, it can be parsed fine (Seconds are stripped automatically anyway)

mskocik commented 1 year ago

I was further thinking about this... This would be useful only with timezone support. Feel free to send PR or you can sponsor it's development.