UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

67 lines (50 loc) 1.82 kB
"use strict"; var registerComponent = require("../../core/component_registrator"), SchedulerWorkSpace = require("./ui.scheduler.work_space.indicator"); var DAY_CLASS = "dx-scheduler-work-space-day"; var SchedulerWorkSpaceDay = SchedulerWorkSpace.inherit({ _getElementClass: function _getElementClass() { return DAY_CLASS; }, _getRowCount: function _getRowCount() { return this._getCellCountInDay(); }, _getCellCount: function _getCellCount() { return this.option("intervalCount"); }, _setFirstViewDate: function _setFirstViewDate() { this._firstViewDate = this._getViewStartByOptions(); this._setStartDayHour(this._firstViewDate); }, _getDateByIndex: function _getDateByIndex(headerIndex) { if (this.option("intervalCount") === 1) { return this._firstViewDate; } var resultDate = new Date(this._firstViewDate); resultDate.setDate(this._firstViewDate.getDate() + headerIndex); return resultDate; }, _getFormat: function _getFormat() { return this._formatWeekdayAndDay; }, _renderDateHeader: function _renderDateHeader() { if (this.option("intervalCount") === 1) { return; } return this.callBase(); }, _getRightCell: function _getRightCell(isMultiSelection) { if (!isMultiSelection) { return this.callBase(isMultiSelection); } return this._$focusedCell; }, _getLeftCell: function _getLeftCell(isMultiSelection) { if (!isMultiSelection) { return this.callBase(isMultiSelection); } return this._$focusedCell; } }); registerComponent("dxSchedulerWorkSpaceDay", SchedulerWorkSpaceDay); module.exports = SchedulerWorkSpaceDay;