-
Notifications
You must be signed in to change notification settings - Fork 6.7k
date picker dd.MM.yyyy #1289
Comments
@fopsdev this won't work out of the box without 3rd party dependencies. The problem is that when converting from text->Date objects we are limited to what JavaScript can parse as string by default. And it is seldom locale-aware. If you need to support custom formats you will need to write a custom parser and - most probably - add dependency on a library that can do this, moment.js for example. There is an example of such custom parser here: We need to improve here and add more documentation so keeping this issue open. But just wanted to share quick info. |
Copying my issue from #1746 When changing the date input manually it ignores the i18n locale pattern. Picking the date from the buttons works fine but changing the input switches the day and month, at least when using the en-gb locale. I'd image other locales are broken too. This is pretty critical in my opinion. Plunkrhttp://plnkr.co/edit/6bwHMKY48mRDdTjZMw00?p=preview Video of issue.https://dl.dropboxusercontent.com/u/14037764/Development/github/ui.bootstrap/datepicker.html |
I had the very same problem and ended up writing my own directive. It's not that beautiful but works so far for me. Please have a look here: http://developer.the-hideout.de/?p=119 |
I ended up disabling the text input, meaning you can only pick the date via the picker. Not the best experience but stops this bug occurring. |
Looking at the code, this fix only fixes the |
@blowsie Which part of the code makes you tell this? This is supposed to be a general solution. |
I may have overlooked this but... this line, and the unit test suggest only the |
On the unit tests and the demo page we cannot add every possible use case. The component responsible for parsing is |
Why is this issue closed? |
What we have been using as a workaround is:
input[ui-date] { Here is a plunker with an example: The draw back is how it affects the usability, not allowing the user to type, although it is better than breaking the application. |
@ftheomunhoz as I mentioned in my comment above, you can just disable the input using the |
Why is this issue and all its referenced ones are closed? DatePicker still don't work with dd/MM/yyyy format when date is entered manually. |
@svarjavand it seems like either this is broken again or @bekos closed it too fast. Reopening. |
On a second thought @svarjavand please create a new issue to prevent this one from being polluted. This is closed because the actual issue is fixed; dates with |
@rvanbaalen I can create a new issue but even dd.MM.yyyy format doesn't work. |
Fair enough. Reason enough to keep this open. |
With version 0.13 the console shows the following error when typing the date "23.12.2007" (pattern: dd.MM.yyyy) directly after typing 23: This is working with version 0.12 |
hi there, i'm testing the datepicker within angular 1.2.2 and bs 3 using our common swiss (and german) date format dd.MM.yyyy
just recognised that entering the date value manually in the textbox does not work as expected. it still uses the first number as the month.
http://plnkr.co/edit/1pdDca5KuWOWh3vPVRvz?p=preview
The text was updated successfully, but these errors were encountered: