1

I have a problem with a bootstrap datepicker. Here is a Plunker example.

This one is not from me. To get it working, you have to change line 60 into:

else if (attrs.initDate)

Just delete the exclamation mark.

Now you get the init-date in the 2nd input-field.

My Problem:

If you click in the 2nd input-field and click somewhere in the document without selecting a date, it changes the init-date into todays date. I want to keep the init date, dough.

Does anyone have a solution for it?

1 Answer 1

2

you can look at the documentation here:
http://bootstrap-datepicker.readthedocs.org/en/latest/options.html#forceparse
look at the forceParse, you need to set it to false.

so just add:

$(element).datepicker({
                        format: format,
                        forceParse: false
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.