﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebEssentials - WebCalendar disable past dates</title><link>http://www.intersoftsolutions.com/Community/WebEssentials/WebCalendar-disable-past-dates/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebCalendar disable past dates</title><link>http://www.intersoftsolutions.com/Community/WebEssentials/WebCalendar-disable-past-dates/</link><pubDate>Mon, 23 Feb 2015 09:27:31 GMT</pubDate><dc:creator>leo.c</dc:creator><category>webcalendar</category><category>Disable past dates</category><description>&lt;p&gt;Hi Dev Ashish&lt;span style="font-size: 10pt;"&gt;,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Unfortunately, WebCalendar still not support disabling specific date. But you could adopt this hack technique by running the following javascript on WebCalendar OnAfterRender ClientSideEvents:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;function EnableOnlyDateRange(WebCalendar, fromDate, toDate)        {
            var a = document.querySelectorAll("#" + WebCalendar.ID + "_f td[unselectable = 'on']");
            if (fromDate)
            {
                fromDate.setHours(0, 0, 0, 0);
            }
            if (toDate)
            {
                toDate.setHours(0, 0, 0, 0);
            }
            for (var i = 0; i &amp;lt; a.length; i++)
            {
                var dateDay = new Date(a[i].getAttribute("y"), a[i].getAttribute("m") - 1, a[i].getAttribute("d"));
                if ((fromDate &amp;amp;&amp;amp; dateDay &amp;lt; fromDate) || (toDate &amp;amp;&amp;amp; dateDay &amp;gt; toDate))
                {
                    a[i].setAttribute("class", WebCalendar.OutboundCellStyle);
                    a[i].setAttribute("cssname", WebCalendar.OutboundCellStyle);
                    a[i].onclick = function () { event.stopPropagation(); };
                }
            }
        }&lt;/pre&gt;&lt;span style="font-size: 10pt;"&gt;Please note that it will only work on browser that have a support for querySelectorAll.&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;To make the disabled date(outbound date) look different, you could simply change it through WebCalendar OutboundCellStyle property.&lt;/p&gt;&lt;p&gt;As a reference, I have attach a simple working sample. Please have the sample evaluated on your end by adding it to WebEssentials sample which is included in the installation folder.&lt;/p&gt;&lt;p&gt;&lt;br&gt;Best Regards,&lt;br&gt;Leo&lt;/p&gt;</description></item><item><title>WebCalendar disable past dates</title><link>http://www.intersoftsolutions.com/Community/WebEssentials/WebCalendar-disable-past-dates/</link><pubDate>Thu, 19 Feb 2015 12:11:00 GMT</pubDate><dc:creator>devashish</dc:creator><category>webcalendar</category><category>Disable past dates</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Is there any way I can disable the past dates in&amp;nbsp;WebCalendar i.e. the user can only select the present date or a future date.&lt;/p&gt;&lt;p&gt;Something like booking a flight where user can only select today or a day in future.&lt;/p&gt;&lt;p&gt;Ans also can you tell how to make the disabled date look different.&lt;/p&gt;&lt;p&gt;Regards,&lt;br&gt;Dev&lt;/p&gt;</description></item></channel></rss>