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

Fix replacing d in month name #45

Merged
merged 1 commit into from
Dec 3, 2016

Conversation

renatomaric
Copy link
Contributor

@renatomaric renatomaric commented Nov 29, 2016

Fix replacing d in month name:

How to reproduce the bug:

  • Set language to Croatian: language="hr"
  • Use format: format="dd. MMMM yyyy"
  • Select any day in November (Croatian: Studeni)
  • Bug: Input value is 11. Stu11eni 2016 instead 11. Studeni 2016

Fix:
In formatDate method replacing d and dd have to be before replacing month.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.19% when pulling e872d88 on renatomaric:master into 2257a01 on charliekassel:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.19% when pulling e872d88 on renatomaric:master into 2257a01 on charliekassel:master.

@coveralls
Copy link

coveralls commented Nov 29, 2016

Coverage Status

Coverage remained the same at 99.19% when pulling a1f79e4 on renatomaric:master into 2257a01 on charliekassel:master.

@renatomaric renatomaric changed the title Fix replacing d in month name Fix replacing d in month name and add class to input Nov 29, 2016
@charliekassel
Copy link
Owner

Hi @renatomaric, thanks for your contribution!
Can you please separate this into two PR's as they do different things.

For the class, maybe it's better to put on the div.datepicker element so everything can be styled insider it to user preferences. This would solve #43

As for the date format, my solution is not very robust :(
I thinking of breaking this out into it's own library or biting the bullet and just using moment.
But put in your PR and I'll pull and write some tests against it, as I think their were issues for English when the day was the first item replaced.

@renatomaric renatomaric changed the title Fix replacing d in month name and add class to input Fix replacing d in month name Nov 30, 2016
@charliekassel charliekassel merged commit 1f14f05 into charliekassel:master Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants