JSFiddle - React, Tailwind, and code Playground
by rwaldin
HTML
<div class="calendarWidget"></div>
JavaScript
!function() {
// dojo.require('wsgc.js.Events');
var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
dim = [31,28,31,30,31,30,31,31,30,31,30,31];
dojo.addOnLoad(function() {
dojo.query('.calendarWidget');
});
dojo.declare('wsgc.js.CalendarWidget', [], {
constructor: function(elem, date) {
this.elem = elem;
this.date = date || new Date();
this.month = this.date.getMonth();
this.day = this.date.getDate();
this.dow = this.date.getDay();
this._init();
// WSI.Events.delegate('click', '.day', this.elem, function(evt) {
// });
},
setDate: function(date) {
this.date = date;
this._render();
},
getDate: function() {
return this.date;
},
_init: function() {
if (this.elem) {
dojo.place('<div class="controls"></div>', this.elem);
var day = 0;
for(var i = 0; i < 5; ++i) {
for(var j = 0; j < 7; ++j) {
if(!i) {
if(!day && j === this.dow) {
} else{
}
}
}
}
dojo.place('<table><thead><tr><th>Sun</th>')
dojo.place('<div class="controls"></div>', this.elem)
}
},
_render: function() {
}
});
function isLeapYear(year) {
}
fu
}();