-
Notifications
You must be signed in to change notification settings - Fork 720
Added name to input attribute and translations #1
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
Conversation
Documentation to translation feature.
Hey @coderdiaz thank you for your contributions! |
@charliekassel It's ok. Greetings. |
src/utils/DateUtils.js
Outdated
let monthName = this.getMonthName(date.getMonth(), traslation.months.original) | ||
let str = format | ||
.replace(/S/, this.getNthSuffix(date.getDate())) | ||
.replace(/D/, this.getDayNameAbbr(date, traslation.days)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suffix and day name rules were originally set to run last so as to not be overridden, for instance a suffix added to the third of the month would result in 3rd
and would then get the d
replaced by the day rule.
Was there another reason you moved these to the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the problem is this.
If you pick September or December in datepicker and the format is 'd MMMM yyyy', your return is for example '8 theptember 2016', the suffix /S/ overwrites 'S'eptember to 'Th'eptember.
And, with December is overwrites by the suffix /D/ to show the name day.
It's therefore, I changed the elements initially to overwrites those rules first and then the others.
Great, thanks. |
Changes are ready! |
Switch month and year depending on the selected language
…CalendarOnFocus add showCalendarOnFocus prop
Add `/dist` files
Thank you for your efforts to make this component.
I've added a property to the text field with the purpose to obtain information within a form, as it did not have the property.
Also, I've added a translation feature.
You can accept the request or not, no problem =).
Best regards.