Skip to content
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

Added configurable limit for amount of items displayed in a single row of monthpicker and yearpicker #1141

Merged
merged 3 commits into from
Oct 26, 2016

Conversation

halfzebra
Copy link
Contributor

@halfzebra halfzebra commented Oct 19, 2016

Rationale

We needed to have more control over the datepicker grid size of the <yearpicker> and <monthpicker>

This feature is borrowed from angular-ui/bootstrap, see yearColumns and monthColumns properties.

I have added two new configuration properties:

  • monthColLimit (?number=3) - number of months displayed in a single row of month picker
  • yearColLimit (?number=5) - number of years displayed in a single row of year picker

Any feedback is very welcome!

Examples

<yearpicker>

3x8

<datepicker
    [yearRange]="24"
    [yearColLimit]="8"
></datepicker>

screen shot 2016-10-19 at 11 42 23

#### 3x3
<datepicker
    [yearRange]="9"
    [yearColLimit]="3"
></datepicker>

screen shot 2016-10-19 at 11 41 54

### `` #### 4x4
<datepicker
    [monthColLimit]="4"
></datepicker>

screen shot 2016-10-19 at 14 36 29

@codecov-io
Copy link

codecov-io commented Oct 19, 2016

Current coverage is 85.62% (diff: 100%)

Merging #1141 into development will not change coverage

@@           development      #1141   diff @@
=============================================
  Files               35         35          
  Lines             1280       1280          
  Methods            228        228          
  Messages             0          0          
  Branches           213        213          
=============================================
  Hits              1096       1096          
  Misses             184        184          
  Partials             0          0          

Powered by Codecov. Last update fe6ad23...012270b

@valorkin
Copy link
Member

Looks very good to me, except properties
but as soon as I will be merging new datepicker...

@valorkin valorkin merged commit 859afb2 into valor-software:development Oct 26, 2016
@halfzebra halfzebra deleted the patch-2 branch October 31, 2016 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants