Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How calendar dates disable?

Posted on by 775

hello,

how i disable extra days from calendar which display earlier by first date

cal.PNG

//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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans