vuejs-datepicker icon indicating copy to clipboard operation
vuejs-datepicker copied to clipboard

Fix typeable dates with custom format (non-US)

Open barbosaalr opened this issue 6 years ago • 19 comments

As we were having problems in our project with typeable dates, we did this modification to make custom (non-US) dates parseable for Date.Parse.

We have added function, based on Kooiinc's generic method to parse dates with different formats, to convert dates with custom format to generic format that can be parsed.

barbosaalr avatar Nov 18 '18 21:11 barbosaalr

Coverage Status

Coverage remained the same at 100.0% when pulling fe9d5f02727e2c2abd3ec6dd32c185b23dc052cb on barbosaalr:master into de0fc75fe6f6572eebf47f94da20716ab7690cff on charliekassel:master.

coveralls avatar Nov 18 '18 21:11 coveralls

Hello, I'm struggling from the same issue. Is this fix in npm already?

korlend avatar Nov 20 '18 08:11 korlend

Hello, I'm struggling from the same issue. Is this fix in npm already?

Nope, not yet...

barbosaalr avatar Nov 20 '18 18:11 barbosaalr

I'd love to see this PR accepted!

AdrianMrn avatar Nov 22 '18 10:11 AdrianMrn

@charliekassel This PR is a life saver. Could you please merge it?

Sander-Toonen avatar Nov 22 '18 13:11 Sander-Toonen

@charliekassel could you look at this pr, would be nice to know if it will get merged or not?

nieka avatar Nov 30 '18 15:11 nieka

Is it already merged?

lexcode avatar Dec 04 '18 14:12 lexcode

@barbosaalr This PR cover case when format option is a function?

@tdmitriiv Maybe a good idea is to implement something like that:

https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#format

... Or, only allow format options as string, not function.

jesusgoku avatar Dec 12 '18 16:12 jesusgoku

This PR fixes most of the problems, but I needed one more thing: I want my date to be only a month & a year (MM/yyyy format) This doesn't solve this as the day is necessary with this PR.

What I did was to add: if (ymd[2] == 0) ymd[2] = "01"; just before var timezone = ... in the parseableDate method.

Now I can type "01/2019" in the input.

MarienMonnier avatar Jan 21 '19 14:01 MarienMonnier

Hi guys, what can we do, to make the PR done as fast as possible? Ty

OrenciucEvghenii avatar Jan 28 '19 23:01 OrenciucEvghenii

Btw. this won't work inside safari because it can't parse the timezone.

MrWook avatar Feb 04 '19 09:02 MrWook

Hello! Is there a quick way to implement this changes? Should I just edit the files in the node installation directly? Thank you!

fessacchiotto avatar Mar 09 '19 18:03 fessacchiotto

Just came across this issue, any update for this?

mrtijn avatar May 06 '19 13:05 mrtijn

any news?????? @charliekassel please 🙏

hladf avatar Jun 04 '19 12:06 hladf

Facing this issue as well! Please approve!

jonvanputten avatar Jul 12 '19 08:07 jonvanputten

Any news on this yet?! Could really use with this merge

gaz-obel avatar Aug 22 '19 08:08 gaz-obel

I have the same issue.

chriswalg avatar Jan 08 '20 20:01 chriswalg

I have same issue too, Has this bug been fixed yet? I type in 1/6/2020 to mean 1st June 2020. But the pop-up locks to 6th Jan 2020.

I-am-Nikola avatar Apr 28 '20 04:04 I-am-Nikola

This won't be fixed. The author didn't commit anything since 24.07.2020 and just replied to really dumb criticism and a request to take over the project. The issues an PR's are pilling up. You should move to another repo, there are forks of this repo that fix a lot of issues

MrWook avatar Apr 29 '20 11:04 MrWook