-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Init date in show method #726
Comments
I had a fix in place for you but the jasmine test failed. I'll have to look into it more, sorry. |
@guilhermeaiolfi check out the dev branch and let me know if that worked for you |
Hi, sorry the delay. I was on vacation. So, I tested the 4.0.0 release and the development branch. None worked for me. Looking at a4e7201 I don't see what change would fix what I described. |
In the like so: if (options.useCurrent && unset && (input.is('input') && input.val().trim().length === 0)) {
...
} else {
setValue(parseInputDate(input.val().trim()));
} It works. I don't see how to solve the problem I'm describing without the above line somewhere in the show function. Since it is what will set the lazy value as date. |
@Eonasdan could you reopen this issue? |
can you setup a fiddle or a demo page for this please? |
Sure, I should have done that from the start: https://jsfiddle.net/UG7Eq/13/ |
the fiddle you posted seems to work just fine for me. What I am looking for? Sorry |
The date set in the model (then propagate to the input element) is not the
|
Were you able to see the problem in the fiddle? |
Hi,
First of all: great lib. Congrats.
So, I was trying to use it in a new project I'm working on that uses ractive.js (but the problem should show up in ember.js, angular, etc as well). The initialization process starts before the databinding process sets the value in the input tag. So it(bootstrap-datetimepicker) thinks there's no date set in the input and use the current date.
To workaround this problem I suggest bring this code:
to the
show
method. So it will consider the value in the input by the time it is going to show the modal window.Edit: I'm using v4beta
The text was updated successfully, but these errors were encountered: