thomastuts
thomastuts

Reputation: 3539

AngularUI Bootstrap datepicker maxDate does not work

I forked the Plunker code from the AngularUI Bootstrap pages (the Datepicker example). I wanted to implement a max date range so you can only select a date in a certain period. You can find the Plunker here: http://plnkr.co/edit/vBrgyC20FBEUzuoprhlh?p=preview

Somehow, the maxDate attribute does not seem to be working while the minDate one does. Does anyone know if I'm doing something wrong here or if it's just a bug?

Upvotes: 0

Views: 5655

Answers (3)

Vivek Singh
Vivek Singh

Reputation: 77

<datepicker min="minDate" max="maxDate" show-weeks="showWeeks"></datepicker>

Worked for me as well, i was struggling with the attribute max-date", Thanks ivarni for your answer

Upvotes: 0

Emerson Farrugia
Emerson Farrugia

Reputation: 11353

You have two date pickers in there. :)

Upvotes: 0

ivarni
ivarni

Reputation: 17878

Your HTML in the plunker

<datepicker min="minDate" show-weeks="showWeeks"></datepicker>

What it should have been

<datepicker min="minDate" max="maxDate" show-weeks="showWeeks"></datepicker>

Seems you just forgot to add the max-attribute?

Upvotes: 1

Related Questions