Period pickup for AngularJS