-
Notifications
You must be signed in to change notification settings - Fork 204
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Option props not being set properly on render #44
Comments
Thanks for the detailed explanation. I'll try to take a look at this. |
I can confirm something is wrong (v1.0.6) with locale. I tried overriding all the local object const locale = {
format: "DD/MM/YYYY",
separator: "à",
applyLabel: "Appliquer",
cancelLabel: "Annuler",
fromLabel: "de",
toLabel: "à",
customRangeLabel: "Personnalisé",
daysOfWeek: ["di", "lu", "ma", "me", "je", "ven", "sa"],
monthNames: [
"Janvier",
"Février",
"Mars",
"Avril",
"Mai",
"Juin",
"Juillet",
"Août",
"Septembre",
"Octobre",
"Novembre",
"Décembre"
],
firstDay: 1
}; But on the second render (again, after choosing a range), the I hope someone can figure it out |
HI, I have the same problem, could you fix this issue? It would be great, thanks |
Hello, I have had the same problem also. For anyone else having this issue I found making the change as described here #53 i.e. removing |
Hi, great library here, @skratchdot. I just opened a PR fixing the problem for this issue in the case of It would be great if you could check it! Thank you. |
Fix skratchdot#44: daysOfWeek breaks after second render when firstDay != 0
closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater |
I want to have the week start on Monday, so I'm rendering the daterpicker like so:
In 0.2.6, this works fine. However in 0.2.7 and all later version, it does not, because of the change to
setOptionsFromProps()
. The constructor for the underlying widget does some smart merging of the options object with defaults; when the constructor finishesthis.locale
ends up looking like this:Then I click on the element, which calls
render()
, which in turns callssetOptionsFromProps()
, and it stomps all over the locale and turns it into{"firstDay":1}
, which in turn causes errors in the underlying plugin because it expects to find keys on the locale object which no longer exist. If I don't try and configure the locale, everything works.I'm not sure what the answer is here, but this is really not working. Is there another way to set the first day of the week?
The text was updated successfully, but these errors were encountered: