Repository navigation
Expand file tree
/
Copy pathspecial-dates.js
More file actions
40 lines (36 loc) · 1.57 KB
/
Copy pathspecial-dates.js
File metadata and controls
40 lines (36 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
this.default = function () {
var span;
var addClass = ej.base.addClass;
var datetimepicker = new ej.calendars.DateTimePicker({
renderDayCell: customDates,
value: new Date('1/13/2017'),
cssClass: 'e-customStyle'
});
datetimepicker.appendTo('#datetimepicker');
function customDates(args) {
if (args.date.getDate() === 10) {
span = document.createElement('span');
span.setAttribute('class', 'e-icons highlight');
addClass([args.element], [ 'e-day','special', 'birthday']);
args.element.firstElementChild.setAttribute('title', 'Birthday !');
args.element.setAttribute('title', 'Birthday !');
args.element.appendChild(span);
}
if (args.date.getDate() === 15) {
span = document.createElement('span');
span.setAttribute('class', 'e-icons highlight');
addClass([args.element], [ 'e-day','special', 'vacation']);
args.element.firstElementChild.setAttribute('title', 'Vacation !');
args.element.setAttribute('title', 'Vacation !');
args.element.appendChild(span);
}
if (args.date.getDate() === 20) {
span = document.createElement('span');
span.setAttribute('class', 'e-icons highlight');
addClass([args.element], [ 'e-day','special', 'farewell']);
args.element.firstElementChild.setAttribute('title', 'Farewell !');
args.element.setAttribute('title', 'Farewell !');
args.element.appendChild(span);
}
}
};