Vulcan/packages/telescope-singleday/lib/client/templates/single_day.js
2015-04-29 14:38:14 +09:00

16 lines
No EOL
516 B
JavaScript

Template.singleDay.helpers({
showDateNav: function () {
return (typeof this.showDateNav === 'undefined') ? true : this.showDateNav;
},
context: function () {
// if instance has a set date use this, else depend on Session variable
var currentDate = (!!this.date) ? this.date: Session.get('currentDate');
return {
terms: {
view: 'singleday',
after: moment(currentDate).startOf('day').toDate(),
before: moment(currentDate).endOf('day').toDate()
}
};
}
});