Repository navigation
Expand file tree
/
Copy pathspecial.js
More file actions
37 lines (33 loc) · 1.35 KB
/
Copy pathspecial.js
File metadata and controls
37 lines (33 loc) · 1.35 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
this.default = function () {
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) {
var span;
if (args.date.getDate() === 10) {
span = document.createElement('span');
span.setAttribute('class', 'e-icons highlight');
addClass([args.element], ['special', 'e-day', '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], ['special', 'e-day', 'farewell']);
args.element.setAttribute('title', 'Farewell !');
args.element.appendChild(span);
}
if (args.date.getDate() === 25) {
span = document.createElement('span');
span.setAttribute('class', 'e-icons highlight');
addClass([args.element], ['special', 'e-day', 'vacation']);
args.element.setAttribute('title', 'Vacation !');
args.element.appendChild(span);
}
}
};