MCPcopy
hub / github.com/logamee/lin-ui / getDayType

Function getDayType

src/calendar/components/mounth/index.js:162–180  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

160
161 // date 循环的某一天
162 getDayType(date) {
163 const { type, minDate, maxDate, currentDate } = this.data;
164
165 if (compareDay(date, minDate) < 0 || compareDay(date, maxDate) > 0) {
166 return 'disabled';
167 }
168
169 if (type === config.TYPE_SINGLE) {
170 return compareDay(date, currentDate) === 0 ? 'selected' : '';
171 }
172
173 if (type === config.TYPE_MULTIPLE) {
174 return this.getMultipleDayType(date);
175 }
176
177 if (type === config.TYPE_RANGE) {
178 return this.getRangeDayType(date);
179 }
180 },
181
182 getBottomInfo(type) {
183 if (this.data.type === config.TYPE_RANGE) {

Callers

nothing calls this directly

Calls 1

compareDayFunction · 0.90

Tested by

no test coverage detected