restorando / angular-pickadate

A simple and fluid inline datepicker for AngularJS with no extra dependencies.
MIT License
273 stars 91 forks source link

jump to date #40

Closed stefanmdt closed 9 years ago

stefanmdt commented 9 years ago

Hi! Is it possible to jump to a specific date by changing the model value? As far as I can see, this is only possible if the date is in the same month as the current date, right?

I changed the following line and removed the currentDate, then its working. But this destroys some logic I guess.

scope.currentDate = scope.currentDate || firstSelectedDate || new Date();

Should "isOutOfRange" also compare the year and not only the month?

date < minDate || date > maxDate || dateFilter(date, 'M') !== dateFilter(scope.currentDate, 'M');

Thx in advance ...

gschammah commented 9 years ago

hi @stefanmdt

In the next release of the library this will be fixed. I assume it will be live some day this week.

Thanks

stefanmdt commented 9 years ago

Nice, thanks.

gschammah commented 9 years ago

@stefanmdt fixed in version 1.0.0