<?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>Jeremyopolis &#187; javascript</title>
	<atom:link href="http://jrsandberg.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://jrsandberg.com</link>
	<description>An History Of Nerdly Activities</description>
	<lastBuildDate>Thu, 08 Apr 2010 16:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Javascript Date Picker</title>
		<link>http://jrsandberg.com/2009/07/javascript-date-picker/</link>
		<comments>http://jrsandberg.com/2009/07/javascript-date-picker/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 07:06:28 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=18</guid>
		<description><![CDATA[Well, I started trying to do a tutorial for one of these so long ago that I might as well just release the finished code. I am releasing it under the MIT license. The code can be found at http://jrsandberg.com/Calendar.txt The calendar works as an iframe. Include the calendar with something like this: &#60;iframe src="Calendar.html" [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I started trying to do a tutorial for one of these so long ago that I might as well just release the finished code.  I am releasing it under the MIT license.  The code can be found at <a href="http://jrsandberg.com/Calendar.txt" target="_blank">http://jrsandberg.com/Calendar.txt</a></p>
<p>The calendar works as an iframe.  Include the calendar with something like this:</p>
<pre>&lt;iframe src="Calendar.html" frameborder="0" width="100"
height="100" name="calendar" id="calendar"/&gt;</pre>
<p>Once the iframe is included, you will also need to add a global variable called &#8220;cal&#8221;.  Just to make the calendar behave nicely you might want to add a &#8220;cal.hideCal();&#8221; to the &lt;body onclick&gt; event.  The calendar will automatically attach itself to the parent window and provide you with the functions you need through the &#8220;cal&#8221; variable.</p>
<p>In order to use the date picker, simply create an input that has the type of text and add the appropriate functions to it:</p>
<pre>&lt;input type="text" name="startDate" id="startDate"
size="10" onclick="cal.popCal(this);"
onkeypress="cal.keyPress(this,event);"/&gt;</pre>
<p>That should be it.  The calendar should align itself with the text box and format the date and things according to the us standard.  The calendar isn&#8217;t an end all or a be all but I think it covers the general functionality really well.</p>
<p>Admittedly, I would rather have the calendar work through a div and not an iframe.  I also don&#8217;t like the fact that it uses a &#8220;hack&#8221; to attach itself to the parent window.  One other word of caution, I don&#8217;t know how well it works in IE.  I have only really used it on Ubuntu firefox 2.5+.</p>
<p>Anyway, if you add any features, find any bugs or use this calendar, I would appreciate any and all feedback you have, good or bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2009/07/javascript-date-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
