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

Datepicker popup doesn't respect "showWeeks: false" with AngularJS git master #1132

Closed
gaydenko opened this issue Oct 7, 2013 · 18 comments
Closed

Comments

@gaydenko
Copy link

gaydenko commented Oct 7, 2013

With this flag set to false calendar grid still renders weeks column both in Chrome and Firefox (can not say about IE9 as far as #1130 )

@pkozlowski-opensource
Copy link
Member

@gaydenko Could you please provide a plunker with a reproduce scenario? It works for me with the latest master:
http://plnkr.co/edit/3RzbTlq3mfP9kWFa2gsn?p=preview

@gaydenko
Copy link
Author

Yes, but in report I'm saying about angularjs master also.

@pkozlowski-opensource
Copy link
Member

@gaydenko updated the plunker to the latest AngularJS master as well: seems to be working OK as well:
http://plnkr.co/edit/CvPvM0fFSIOVgOpgW3ms?p=preview

@gaydenko
Copy link
Author

I set showWeeks: false in datepickerConfig constant (as far as datepickerPopupConfig hasn't the option), and use popup only. Weeks are shown on initial popup. Yes, button toggling weeks does work, but the aim is to open popup without weeks initially.

@pkozlowski-opensource
Copy link
Member

OK, thnx @gaydenko I can see now. Thnx for bearing with me....

@guinnberg
Copy link

This is happening because of the way the attributes are being handled in the popup directive.
It should be solved with the PR #1120 but being specified as an attribute since there's no access to datepickerConfig from the popup directive

@gaydenko
Copy link
Author

Current git master does work with

show-weeks='false'

attribute, but it isn't too handy to flood markup with attributes which can be set once, I guess..

@guinnberg
Copy link

@gaydenko oh yes, very true... anyway the PR keeps fixing your issue. I added some tests to check it. Try it out if you want and let me know if there's something missing.

@gaydenko
Copy link
Author

@ivogallego

The pr resolves the issue but introduce another one - dp popup being activated inside collapse directive stays inside uncollapsed element and is truncated.
dpincollapse01
Here a fragment with lighter bg is collapsible element.

@guinnberg
Copy link

sorry @gaydenko but I don't get exactly what you mean, would you mind to create a plunkr? Thanks in advance!

@gaydenko
Copy link
Author

I don't know how to ref to branch with pr. Just place dp inside collapse directive:

https://github.com/angular-ui/bootstrap/tree/master/src/collapse

@guinnberg
Copy link

You can just fork my repo https://github.com/ivogallego/bootstrap

Anyway I'll give it a look and see what happens...

@guinnberg
Copy link

I've tried with 0.6 and latest master version and the result is the same so it looks that's a different issue: http://plnkr.co/edit/5O4OCZ?p=preview

Maybe it's better if you open a new issue for that topic

@gaydenko
Copy link
Author

I test against git master.
To reproduce the issue start your test at collapsed state:

<div ng-controller="DatepickerDemoCtrl" ng-init='dpc = true'>

@guinnberg
Copy link

@gaydenko plunker against master branch: http://plnkr.co/edit/CNTmrl?p=preview

It's true what you say, but it's not related to the show-weeks param, so I think you should open a new issue for this.

@bekos
Copy link
Contributor

bekos commented Oct 20, 2013

@gaydenko Use the new datepicker-append-to-body attribute. See http://plnkr.co/edit/lzCpgo?p=preview

@gaydenko
Copy link
Author

@ivogallego Heh.. I also use last rc for angularjs itself :)

@bekos I have already set this flag to true in datepickerPopupConfig constant.

@alaksandarjesus
Copy link

$scope.dateOptions = {
formatYear: 'yy',
startingDay: 1,
showWeeks:false //Adding this line solve the issue in the controller

};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants