2
0

BasicDayView.js 956 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* A view with a single simple day cell
  2. ----------------------------------------------------------------------------------------------------------------------*/
  3. fcViews.basicDay = BasicDayView; // register this view
  4. function BasicDayView(calendar) {
  5. BasicView.call(this, calendar); // call the super-constructor
  6. }
  7. BasicDayView.prototype = createObject(BasicView.prototype); // define the super-class
  8. $.extend(BasicDayView.prototype, {
  9. name: 'basicDay',
  10. incrementDate: function(date, delta) {
  11. var out = date.clone().stripTime().add('days', delta);
  12. out = this.skipHiddenDays(out, delta < 0 ? -1 : 1);
  13. return out;
  14. },
  15. render: function(date) {
  16. this.start = this.intervalStart = date.clone().stripTime();
  17. this.end = this.intervalEnd = this.start.clone().add('days', 1);
  18. this.title = this.calendar.formatDate(this.start, this.opt('titleFormat'));
  19. BasicView.prototype.render.call(this, 1, 1, false); // call the super-method
  20. }
  21. });