Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

locale bug when edit events #38

Closed
MarcelBuian opened this issue Mar 22, 2015 · 14 comments
Closed

locale bug when edit events #38

MarcelBuian opened this issue Mar 22, 2015 · 14 comments

Comments

@MarcelBuian
Copy link

Hello. Great plugin. Just tested it.
I have integrated angular-i18n for my locale and moment.js too.
The calendar works great, in my language with my locale strings and the weekly days begins with "Monday".

But in "Edit events" tab, StartsAt and EndsAt show me something like "Wed Mar 25 2015 08:30:00 GMT+0200 (EET)". When I change date from calendar view and click on some date - this field will show me the right locale date (for my language), but when click on some buttons (when changing time, for example) the wrong date (english format) appears again.
Another bug is that when calendar-picker displays the first weekly day is "Sunday" (translated in my language, that is good), but must be "Monday" (as it in first big calendar).

I don't know if these bugs comes from this plugin or maybe I do something wrong.

@mattlewis92
Copy link
Owner

Can you send me a screenshot of the parts that aren't being translated just so we're on the same page. Thanks.

@MarcelBuian
Copy link
Author

screenshot from 2015-03-23 12 52 51
screenshot from 2015-03-23 12 53 11
screenshot from 2015-03-23 12 53 45

Here is some pics.

@mattlewis92
Copy link
Owner

Ah OK, I thought that was the case. The datepicker there isn't actually a part of this library, it's part of the ui-bootstrap library.

Maybe use a different datepicker? I've used this one before and I think it has the i18n support you need.

@MarcelBuian
Copy link
Author

ok, then I need to integrate other datepicker?
Thx.

@mattlewis92
Copy link
Owner

Using another datepicker with proper i18n support should solve your problem.

@MarcelBuian
Copy link
Author

Thank you again. Cool plugin.

@MarcelBuian
Copy link
Author

hey, I just read that this plugin have i18n support.
Here we can see some examples http://stackoverflow.com/questions/19671887/angularjs-angular-ui-bootstrap-changing-language-used-by-the-datepicker
Maybe in your project exists some conflicts between loading angular model?

It work's good only when I click on some date from calendar. After clicking on buttons that change the string comes back in english.
I will investigate what can be the reason, but if you can help, I will appreciate.

@MarcelBuian
Copy link
Author

I can see this bug in your demo, too.
Notice that your "Starts at" Event is for the beginning something like "Wed Mar 25 2015 08:30:00 GMT+0200 (EET)"

After picking a date (for example 1 march) this field will be "Mar 1, 2015 8:30:00 AM"
This is good, how it must be, but after changing the hour (for example) the field will be again something like "Sun Mar 01 2015 09:30:00 GMT+0200 (EET)".

I tried to replicate this behavior without your plugin. And these strings works good. Please check this when you have some free time. Thanks.

@mattlewis92
Copy link
Owner

I can replicate the bug you are experiencing but it has nothing to do with the calendar. When I remove the calendar plugin from the demo it still occurs. It's an issue with ui-bootstrap and not with this library. Here's a codepen to demonstrate the problem with the calendar stripped out of it: http://codepen.io/anon/pen/VYgKzo

Edit: it's due to angular 1.3. If you downgrade the angular version in the example to 1.2 then it works OK. Looks like a known bug with ui-bootstrap: angular-ui/bootstrap#2659

@MarcelBuian
Copy link
Author

Just found the problem. Angular 1.3.15 is incompatible with ui-bootstrap-0.12.1

Tested with angular 1.2.16 and works fine.
http://codepen.io/anon/pen/GgzNad

Should I use angular 1.2.16 instead of 1.3.15?

@mattlewis92
Copy link
Owner

I'm planning on dropping support for angular 1.2 in the calendar soon, you could try this fix: angular-ui/bootstrap#2659 (comment)

@MarcelBuian
Copy link
Author

Good. Now looks better: http://codepen.io/anon/pen/azXBeB
Still persist a small problem: On loading page: fields doesn't have hours.

@mattlewis92
Copy link
Owner

Try this one instead, it seems to work: angular-ui/bootstrap#2659 (comment)

@MarcelBuian
Copy link
Author

yes, that fix resolve all my problems. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants