These are chat archives for indrimuska/angular-moment-picker

24th
Aug 2016
wylanosorio
@wylanosorio
Aug 24 2016 15:29
Hi @indrimuska, is there an option on decade view where we can specify the years like 1970-1979 on initial selection?
Indri Muska
@indrimuska
Aug 24 2016 18:36

Hi @wylanosorio, no methods allow you to do that in a “cleaning” way. Anyway there are many workaround you can use to achieve that goal, like this:

ctrl.date = '1975-05-01';
$timeout(function () { ctrl.date = ''; });

Or you can use internal scope of the directive:

$timeout(function () {
    var dateScope = angular.element(document.querySelector('.moment-picker-container')).scope();
    dateScope.view.update(dateScope.view.moment = moment([1975, 5, 1]));
});