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

min-mode doesn't work with datepicker popup #2618

Closed
Zacharias3690 opened this issue Aug 21, 2014 · 11 comments
Closed

min-mode doesn't work with datepicker popup #2618

Zacharias3690 opened this issue Aug 21, 2014 · 11 comments

Comments

@Zacharias3690
Copy link

fix was pushed for datepicker-mode on popup in #2180, but min-mode still doesn't work in 0.12.0.

because 0.12.0 isn't available on plunker, here's my markup for reference

<input type="text" class="form-control" 
                            datepicker-popup="MMMM yyyy" 
                            datepicker-mode="'month'" 
                            min-mode="'month'" 
                            ng-model="vm.endDate" 
                            is-open="endOpen" 
                            ng-click="endOpen=true" />
@suksit
Copy link

suksit commented Aug 28, 2014

I’m getting this problem as well.

Compiled the latest source from GitHub, had datepicker-mode and min-mode set to "month".

When the popup is shown and I selected a month, it displayed the day selection instead of just closing.

@amidudu
Copy link

amidudu commented Aug 30, 2014

After some debugging you can workaround this issue by adding the following attribute to your input
datepicker-options="{minMode: 'month',datepickerMode: 'month'}"

@alapsraval
Copy link

so I was trying to use min-mode and datepicker-options to create a month/year picker for a credit card expiration but could not make it work. Finally I found this solution with the help of João Bruni.
You need to set minMode:"month" in datepicker-options and set a directive datepicker-mode="'month'" to make it work.
Please see the plnkr for workin demo. http://plnkr.co/edit/a66q7GjMTXTsPkpyLEt5?p=preview

@johncronan
Copy link

I am finding (with 0.12.0) that if I set datepicker-mode="myModel" and also datepicker-options="{ "minMode": myModel }" then the component initializes correctly, but changing the value of myModel only affects datepicker-mode and not min-mode.

@kannajune
Copy link

thanks amidudu
its working well

@davidhantson
Copy link

I'm experiencing the same issue as johncronan,
any news on this? I really need to change the minMode on the fly, I have some graphs depending on it.
Thanks for the nice work on the component though, it really saves my day.

@prettycode
Copy link

+1 min-mode isn't respected, whether it's specified as attribute or in datepicker-options attribute value object.

@Slimmmo
Copy link
Contributor

Slimmmo commented Jun 3, 2015

The min-mode problem is very odd. Would love a fix.
http://plnkr.co/edit/CoqkFvOM7GGNPHzb3iGq?p=preview
Thanks.

@rvanbaalen
Copy link
Contributor

Feel free to submit a PR, @Slimmmo

@Slimmmo
Copy link
Contributor

Slimmmo commented Jul 14, 2015

I think I've fixed the issues in this thread with my PR. It fixed my problem at least. Enjoy.

@wesleycho wesleycho modified the milestones: 0.13.1 (Performance), Purgatory Jul 19, 2015
@wesleycho wesleycho modified the milestones: 0.13.1 (npm), 0.13.2 (Performance) Jul 23, 2015
@wesleycho wesleycho modified the milestones: 0.13.2 (1.4 support), 0.13.3 (Performance) Aug 2, 2015
@urvashi-bhatt
Copy link

It is Possible to set min-mode="week" ?

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

No branches or pull requests