hello,
how i disable extra days from calendar which display earlier by first date
//Its my code
function calendar(){
var dy=1;
var html = "";
html += "<table style='background-color:#FDEBD0' border=1><tr><td class='seco' colspan=8>"+mn[m]+' '+y+"</td></tr>";
html += "<tr><td class='wid' colspan='8'><button value='preyear' onclick='preyear()'><<<button value='premonth' onclick='premonth()'><<button value = 'today' onclick = 'today()' name='Today'>Today<button value = 'nextmonth' onclick='nextmonth()'>><button value = 'nextyear' onclick = 'nextyear()'>>></td></tr>";
html += "<tr><th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr>";
html += "<tr>";
for (var i=1; i<36; i++){
var fday=new Date(y,m,1);
days=new Date(y,m,i-fday.getDay());
if (days.toDateString()== date.toDateString()){
html += "<td class='day' style=background-color:grey>"+days.getDate()+"<p>Email<br>Phone Calls<br>Appointment<br>Messages</p></td>";
html +=""
}
else{
html += "<td class='day'>"+days.getDate()+"</td>";
}
if (i%7 == 0){
html =html + "</tr><tr>";
}
}
html += "</tr></table>";
document.body.innerHTML = html;
}
Thanx.....,
*This post is locked for comments
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156