﻿<?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 - Lounge - Need to get only month and year when WebCalendar in Quarter Mode</title><link>http://www.intersoftsolutions.com/Community/Lounge/Need-to-get-only-month-and-year-when-WebCalendar-in-Quarter-Mode/</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>Need to get only month and year when WebCalendar in Quarter Mode</title><link>http://www.intersoftsolutions.com/Community/Lounge/Need-to-get-only-month-and-year-when-WebCalendar-in-Quarter-Mode/</link><pubDate>Tue, 06 Jan 2015 11:32:48 GMT</pubDate><dc:creator>yudi</dc:creator><category>webcalendar</category><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hi Hachi K,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In the current build version of WebCalendar there is no such feature: to have the calendar show only months and year; and populate selected month and year into textbox once user select a month. I might be able to help by submitting this as feature request to the development team.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;For a quick solution, you could use the following &lt;em&gt;hack technique&lt;/em&gt; to have that behavior:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;JavaScript code&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;function Render()
{
    var a = setTimeout(ChangeDateTimeInfo,1);
}

function ChangeDateTimeInfo()
{
    var calendar = ISGetObject("WebCalendar1");
    var dateTime = calendar.SelectedDate;
    var month = (dateTime.getMonth() + 1);
    var qt = Math.ceil(month / 3);            
    var querter = calendar.GetMonthCellsByQuarter(qt);
            
    for (var i = 0; i &amp;lt; querter.length ; i++) {
        if (querter[i].getAttribute("m") != month) {
            querter[i].removeAttribute("style");
        }
    }

    var input = document.getElementById("TextBox1");

    if (input)
        input.value = month + "/" + dateTime.getFullYear();
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;ASPX code&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;ISWebEssentials:WebCalendar ViewMode="Quarter" ID="WebCalendar2" runat="server" Height="190px" Width="170px"&amp;gt;
    &amp;lt;ClientSideEvents OnSelectedDateChanged="ChangeDateTimeInfo" OnAfterRender="Render()" /&amp;gt;
&amp;lt;/ISWebEssentials:WebCalendar&amp;gt;
&amp;lt;asp:TextBox ID="TextBox1" runat="server"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this is useful.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Need to get only month and year when WebCalendar in Quarter Mode</title><link>http://www.intersoftsolutions.com/Community/Lounge/Need-to-get-only-month-and-year-when-WebCalendar-in-Quarter-Mode/</link><pubDate>Sat, 06 Dec 2014 11:16:13 GMT</pubDate><dc:creator>sample4170</dc:creator><category>webcalendar</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I am using webcalendar along with a text box. What I need is to have the calendar show only months and year; when a month is selected, that month and year is populated into the textbox.&lt;/p&gt;&lt;p&gt;Quarter mode is fitting as it shows only month and year, but when month is selected, the quarter for that month is resulting for getMonth().&lt;/p&gt;&lt;p&gt;Is there any other way for acheiving this? As this little urgent, it would be good if I could get a response soon. Thanks.&lt;/p&gt;</description></item></channel></rss>