Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Allow init-date to be set just as min-date#2132

Closed
jtomaszewski wants to merge 1 commit into
angular-ui:masterfrom
jtomaszewski:patch-1
Closed

Allow init-date to be set just as min-date#2132
jtomaszewski wants to merge 1 commit into
angular-ui:masterfrom
jtomaszewski:patch-1

Conversation

@jtomaszewski

Copy link
Copy Markdown

Currently, we can bind init-date attribute only to datepicker attribute.

If I set with on element with datepicker-popup directive, init-date attribute is ignored. Example:

<input type="text" datepicker-popup="true" init-date="2014-02-18" />

It isn't stored also in global datepickerConfig - why not, if min-date and max-date is there at the same time?

jtomaszewski added a commit to jtomaszewski/bootstrap-bower that referenced this pull request May 1, 2014
jtomaszewski added a commit to jtomaszewski/bootstrap-bower that referenced this pull request May 1, 2014
jtomaszewski added a commit to jtomaszewski/bootstrap-bower that referenced this pull request May 2, 2014
So we can bind `init-date` to element with `datepicker-popup` directive or to global `datepickerConfig`.
jtomaszewski added a commit to jtomaszewski/bootstrap-bower that referenced this pull request May 2, 2014
@jtomaszewski

Copy link
Copy Markdown
Author

Sorry for the spam of commits but I finally found a clear and working solution.

Some specs would be cool but first I wanted to hear that the change is okay =)

@bekos

bekos commented May 3, 2014

Copy link
Copy Markdown
Contributor

@jtomaszewski min-date and max-date are watched attributes, and that's the reason we handle them like this. init-date is not, so the way to use it is to pass it through datepicker-options. Is this your problem?

Seems that this is confusing a lot of people. Probably we need to improve the docs or change the API.

@jtomaszewski

Copy link
Copy Markdown
Author

Ah. So this is what are these 👀 icons for on the bootstrap docs page - I've been wondering for days what they mean.

The API is rather OK I think.
A short note/warning in the datepicker's docs would be really helpful - I had no idea about that I can specify the min-date as a normal attribute, but not init-date, with the datepicker-popup directive.

@bekos

bekos commented May 5, 2014

Copy link
Copy Markdown
Contributor

@jtomaszewski I suppose we can close this then. If you think we can improve our docs please send a PR.

@bekos bekos closed this May 5, 2014
@jtomaszewski jtomaszewski deleted the patch-1 branch May 5, 2014 23:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants