<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ajax Updates &#187; New Date</title>
	<atom:link href="http://www.ajaxupdates.com/tag/new-date/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxupdates.com</link>
	<description>Latest Ajax Scripts, Examples, News and other Ajax related stuff</description>
	<lastBuildDate>Fri, 12 Feb 2010 12:46:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Selecting Dates in Calendar Script</title>
		<link>http://www.ajaxupdates.com/selecting-dates-in-calendar-script/</link>
		<comments>http://www.ajaxupdates.com/selecting-dates-in-calendar-script/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 17:08:35 +0000</pubDate>
		<dc:creator>alyaspk</dc:creator>
				<category><![CDATA[Ajax Calendar Scripts]]></category>
		<category><![CDATA[Ajax Scripts]]></category>
		<category><![CDATA[Calendar Dates]]></category>
		<category><![CDATA[Calendar Method]]></category>
		<category><![CDATA[Calendar Month]]></category>
		<category><![CDATA[calendar script]]></category>
		<category><![CDATA[Current]]></category>
		<category><![CDATA[Dat]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[Element]]></category>
		<category><![CDATA[Eric Miraglia]]></category>
		<category><![CDATA[New Date]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[Php Downloads]]></category>
		<category><![CDATA[Presentation Platform]]></category>
		<category><![CDATA[Script Php]]></category>
		<category><![CDATA[Select Option]]></category>
		<category><![CDATA[Setdate]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[Yahoo Calendar]]></category>
		<category><![CDATA[Yahoo Widget]]></category>
		<category><![CDATA[Year Calendar]]></category>

		<guid isPermaLink="false">http://www.ajaxupdates.com/?p=1844</guid>
		<description><![CDATA[A function that will select all dates in the currently displayed calendar month.
Start with a simple Calendar instance, and set its
MULTI_SELECT
 option to true:
this.myCal = new YAHOO.widget.Calendar(&#34;calendarEl&#34;, &#34;calendar&#34;,&#34;10/2006&#34;);
this.myCal.Options.MULTI_SELECT = true;
this.myCal.render();
Create an element on the page to handle a click, one which you wire to a function that selects all of the days for the currently [...]


Related Listings:<ol><li><a href='http://www.ajaxupdates.com/week-calendar-using-jquery/' rel='bookmark' title='Permanent Link: Week Calendar using Jquery'>Week Calendar using Jquery</a> <small>A jquery plugin providing a weekly view of calendar events....</small></li>
<li><a href='http://www.ajaxupdates.com/javascript-calendar-using-mootools/' rel='bookmark' title='Permanent Link: Javascript Calendar Using MooTools'>Javascript Calendar Using MooTools</a> <small>The idea is to use MooGenda to quickly expose your...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A function that will select all dates in the currently displayed calendar month.</p>
<p>Start with a simple Calendar instance, and set its
<pre class="brush: php">MULTI_SELECT</pre>
<p> option to true:</p>
<pre class="brush: javascript">this.myCal = new YAHOO.widget.Calendar(&quot;calendarEl&quot;, &quot;calendar&quot;,&quot;10/2006&quot;);
this.myCal.Options.MULTI_SELECT = true;
this.myCal.render();</pre>
<p>Create an element on the page to handle a click, one which you wire to a function that selects all of the days for the currently displayed calendar month. Our goal is to use Calendar&#8217;s <a href="http://developer.yahoo.com/yui/docs/calendar/YAHOO.widget.Calendar_Core.html#select">
<pre class="brush: php">select</pre>
<p></a> method to select a date range, represented as a string (e.g., &#8220;12/1/2005-12/31/2005&#8243;); we pass that string as an argument to
<pre class="brush: php">select</pre>
<p>, then re-
<pre class="brush: php">render</pre>
<p>.  Having done that, our dates are then selected and the display of the Calendar reflects the change.</p>
<p>Here&#8217;s the interesting part — the handler — with comments:</p>
<pre class="brush: javascript">//get the current month and year of the calendar
var currentMonth = this.myCal.pageDate.getMonth();
var currentYear = this.myCal.pageDate.getFullYear();

//get the date of the last day of this month;
//use Calendar&#039;s pageDate property to get the
//currently displayed month:
var tempDate = new Date(this.myCal.pageDate);
//set temp date to next month:
tempDate.setMonth(tempDate.getMonth() + 1);
//set temp date to last day of last month:
tempDate.setDate(0);
//get the actual day out of the date object:
var lastDayOfCurrentMonth = tempDate.getDate();

//create a string designating all the current days of this
//month: eg, 12/1/2005-12/31/2005;
//we&#039;ll pass that into our calendar instance
//below.
var dateString = (currentMonth + 1) + &quot;/1/&quot; + currentYear + &quot;-&quot; + (currentMonth + 1) + &quot;/&quot; + lastDayOfCurrentMonth + &quot;/&quot; + currentYear;

//use Calendar&#039;s select method to select all days
//in current month:
this.myCal.select(dateString);
this.myCal.render();</pre>
<p><strong>Eric Miraglia</strong>, Yahoo Presentation Platform Engineering</p>
<p>Demo: <a href="http://yuiblog.com/sandbox/yui/v0113/examples/calendar/select_dates_by_script.php">http://yuiblog.com/sandbox/yui/v0113/examples/calendar/select_dates_by_script.php</a></p>
<p>Downloads:</p>
<p>Source: <a href="http://yuiblog.com/sandbox/yui/v0113/examples/calendar/select_dates_by_script.php">http://yuiblog.com/sandbox/yui/v0113/examples/calendar/select_dates_by_script.php</a></p>
<div id="st0000000001" class="st-taf"><script src="http://taf.socialtwist.com:80/taf/js/shoppr.core.js?id=0000000001"></script><img style="border:0;margin:0;padding:0;" src="http://tellafriend.socialtwist.com:80/wizard/images/tafbutton_blue16.png" onmouseout="hideHoverMap(this)" onmouseover="showHoverMap(this, '0000000001', 'http%3A%2F%2Fwww.ajaxupdates.com%2Fselecting-dates-in-calendar-script%2F', 'Selecting+Dates+in+Calendar+Script')" onclick="cw(this, {id:'0000000001',link: 'http%3A%2F%2Fwww.ajaxupdates.com%2Fselecting-dates-in-calendar-script%2F', title: '+Selecting+Dates+in+Calendar+Script+' })"/></div>

<p>Related Listings:<ol><li><a href='http://www.ajaxupdates.com/week-calendar-using-jquery/' rel='bookmark' title='Permanent Link: Week Calendar using Jquery'>Week Calendar using Jquery</a> <small>A jquery plugin providing a weekly view of calendar events....</small></li>
<li><a href='http://www.ajaxupdates.com/javascript-calendar-using-mootools/' rel='bookmark' title='Permanent Link: Javascript Calendar Using MooTools'>Javascript Calendar Using MooTools</a> <small>The idea is to use MooGenda to quickly expose your...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.ajaxupdates.com/selecting-dates-in-calendar-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->