<?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>Trent Richardson &#187; Javascript</title> <atom:link href="http://trentrichardson.com/category/javascript/feed/" rel="self" type="application/rss+xml" /><link>http://trentrichardson.com</link> <description>practical web design &#38; development</description> <lastBuildDate>Wed, 25 Jan 2012 11:43:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Using Impress.js for a Car Bounce Video</title><link>http://trentrichardson.com/2012/01/25/using-impress-js-for-a-car-bounce-video/</link> <comments>http://trentrichardson.com/2012/01/25/using-impress-js-for-a-car-bounce-video/#comments</comments> <pubDate>Wed, 25 Jan 2012 11:43:16 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[car bounce]]></category> <category><![CDATA[html]]></category> <category><![CDATA[presentation]]></category> <category><![CDATA[transformations]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1088</guid> <description><![CDATA[I was pretty amazed when I first saw Impress.js. It&#8217;s ability to take a very simple html page and use transformations to create a presentation phenomenal. This plays right in to the hands of developers who want to create something snazzy, but do not have the video experience to do so. It is also probably [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/11/22/car-bounce-keep-up-with-your-cars-value/' rel='bookmark' title='Car Bounce &#8211; Keep Up with Your Car&#8217;s Value'>Car Bounce &#8211; Keep Up with Your Car&#8217;s Value</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I was pretty amazed when I first saw <a
href="http://bartaz.github.com/impress.js/#/bored" title="Impress.js" target="_blank">Impress.js</a>.  It&#8217;s ability to take a very simple html page and use transformations to create a presentation phenomenal.  This plays right in to the hands of developers who want to create something snazzy, but do not have the video experience to do so.  It is also probably worth noting that it has likely been done before, but this is the first I&#8217;ve seen (I didn&#8217;t do much research on it, I was happy with what I saw).</p><p>Its process is simple, line up multiple container elements inside a container with id=&#8221;impress&#8221;, and supply those elements with a variety of data coordinates and scaling attributes, resulting in something like:</p><pre><code class="html">
&lt;div id="block1" class="step" data-x="1000" data-y="1500" data-rotate="90" data-scale="2"&gt;
    &lt;p>This is a test&lt;/p&gt;
&lt;/div&gt;
</code></pre><p>Impress will take the coordinates and scale and place them on your canvas.  You can also apply 3D effects too using the z for the 3rd dimension and rotate on the x and y axis:</p><pre><code class="html">
&lt;div class="block2" data-x="1500" data-y="2000" data-z="-100" data-rotate-x="-40" data-rotate-y="10" data-scale="2"&gt;
    &lt;p>This is a test&lt;/p&gt;
&lt;/div&gt;
</code></pre><p>Thats all, just line up these different containers in order and Impress does the rest.  Style them up a little and you have a snazzy presentation!  I will leave you with simple demo I came up with for CarBounce.com</p><p><iframe
width="480" height="360" src="http://www.youtube.com/embed/Fr5JreMYmlo?rel=0" frameborder="0" allowfullscreen></iframe></p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/11/22/car-bounce-keep-up-with-your-cars-value/' rel='bookmark' title='Car Bounce &#8211; Keep Up with Your Car&#8217;s Value'>Car Bounce &#8211; Keep Up with Your Car&#8217;s Value</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2012/01/25/using-impress-js-for-a-car-bounce-video/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Make jQueryUI and Timepicker More Beautiful</title><link>http://trentrichardson.com/2012/01/23/make-jqueryui-and-timepicker-more-beautiful/</link> <comments>http://trentrichardson.com/2012/01/23/make-jqueryui-and-timepicker-more-beautiful/#comments</comments> <pubDate>Mon, 23 Jan 2012 11:24:28 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Timepicker]]></category> <category><![CDATA[custom]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[jqueryui]]></category> <category><![CDATA[themes]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1071</guid> <description><![CDATA[After some time the standard jQueryUI themes can get stale, boring, monotonous, and you need a fresh look. I&#8217;ve rounded up a couple very customized, non-&#8221;run of the mill&#8221; themes you should take a look at. Absolution (Github) is a very clean theme with support for Uniform and Wijmo. Uniform, as its name indicates, styles [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2008/04/15/new-impromput-theme/' rel='bookmark' title='New Impromptu Theme!'>New Impromptu Theme!</a></li><li><a
href='http://trentrichardson.com/2010/11/15/timepicker-0-8-bug-fix-galore/' rel='bookmark' title='Timepicker 0.8, Bug Fix Galore'>Timepicker 0.8, Bug Fix Galore</a></li><li><a
href='http://trentrichardson.com/2010/12/28/jquery-timepicker-addon-0-9-2-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.2 Available'>jQuery Timepicker Addon 0.9.2 Available</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://trentrichardson.com/wp-content/uploads/2012/01/absolution-timepicker.png"><img
src="http://trentrichardson.com/wp-content/uploads/2012/01/absolution-timepicker.png" alt="" title="absolution-timepicker" width="205" height="334" class="alignright size-full wp-image-1072" /></a></p><p>After some time the standard jQueryUI themes can get stale, boring, monotonous, and you need a fresh look.  I&#8217;ve rounded up a couple very customized, non-&#8221;run of the mill&#8221; themes you should take a look at.</p><p><a
href="http://www.michaelvanderheeren.be/archives/382" title="Absolution jQueryUI Theme" target="_blank">Absolution</a> (<a
href="https://github.com/michaelvanderheeren/Absolution" title="Absolution on Github" target="_blank">Github</a>) is a very clean theme with support for <a
href="http://uniformjs.com/" title="Uniform JS" target="_blank">Uniform</a> and <a
href="http://wijmo.com/" title="Wijmo UI Widgets" target="_blank">Wijmo</a>.  Uniform, as its name indicates, styles form elements to have a uniform look, across all browsers.  Drastically, improving the consistency of appearance.  Wijmo is a snazzy widget collection providing both an &#8220;Open&#8221; (open source) and &#8220;Complete&#8221; (commercial) set of widgets.  The developer has a few example widgets on their site showing off the look on all widgets. Another bonus is that development is handled with LESS, making it super easy to tweak.  I will definitely keep this close by for future development!</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2012/01/Aristo-Timepicker.jpg"><img
src="http://trentrichardson.com/wp-content/uploads/2012/01/Aristo-Timepicker.jpg" alt="" title="Aristo-Timepicker" width="206" height="296" class="alignleft size-full wp-image-1073" /></a></p><p>A second theme worth a look is <a
href="http://taitems.tumblr.com/post/482577430/introducing-aristo-a-jquery-ui-theme" title="Aristo jQueryUI Theme" target="_blank">Aristo</a> (<a
href="https://github.com/taitems/Aristo-jQuery-UI-Theme" title="Aristo on Github" target="_blank">Github</a>), a port of Cappuccino.  It has a bit more of an OSX look, but still a very clean, beautiful theme.  An example of all widgets are included on the developer&#8217;s site.</p><p>Just looking over the Absolution I am impressed with how LESS makes this look so more portable and themable than if only the CSS were provided.  I definitely need to get up to speed on using LESS and the compiler.  Better keep an eye out for integration on an upcoming project ;)</p><p>Both of these themes appear to work very well with Timepicker as well as the SliderAccess plugin, and are a nice compliment to most any jQueryUI based project!  I&#8217;m still on the hunt for more quality custom jQueryUI themes for projects, so if you know of any please post them!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2008/04/15/new-impromput-theme/' rel='bookmark' title='New Impromptu Theme!'>New Impromptu Theme!</a></li><li><a
href='http://trentrichardson.com/2010/11/15/timepicker-0-8-bug-fix-galore/' rel='bookmark' title='Timepicker 0.8, Bug Fix Galore'>Timepicker 0.8, Bug Fix Galore</a></li><li><a
href='http://trentrichardson.com/2010/12/28/jquery-timepicker-addon-0-9-2-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.2 Available'>jQuery Timepicker Addon 0.9.2 Available</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2012/01/23/make-jqueryui-and-timepicker-more-beautiful/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>UberUploadCropper V2 &#8211; Upload, Crop, No Flash</title><link>http://trentrichardson.com/2011/12/20/uberuploadcropper-v2-upload-crop-no-flash/</link> <comments>http://trentrichardson.com/2011/12/20/uberuploadcropper-v2-upload-crop-no-flash/#comments</comments> <pubDate>Tue, 20 Dec 2011 11:51:19 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Impromptu]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[crop]]></category> <category><![CDATA[jcrop]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[resize]]></category> <category><![CDATA[upload]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1056</guid> <description><![CDATA[Finally, UberUploadCropper gets a much needed update. First off, flash is gone. Now you can upload and crop with just javascript and your serverside language of choice. What is UberUploadCropper? It is a jQuery plugin which pulls together jCrop, Impromptu, and FileUploader plugins into one uniform unit to upload and crop images. The latest version [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2010/04/12/uberuploadcropper-0-2-with-example/' rel='bookmark' title='UberUploadCropper 0.2 With Example'>UberUploadCropper 0.2 With Example</a></li><li><a
href='http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/' rel='bookmark' title='Javascript: Finding the Focused Element'>Javascript: Finding the Focused Element</a></li><li><a
href='http://trentrichardson.com/2011/10/14/impromptu-3-2-mobile-jquery-prompts/' rel='bookmark' title='Impromptu 3.2 &#8211; Mobile jQuery Prompts'>Impromptu 3.2 &#8211; Mobile jQuery Prompts</a></li></ol>]]></description> <content:encoded><![CDATA[<p>Finally, UberUploadCropper gets a much needed update.  First off, flash is gone.  Now you can upload and crop with just javascript and your serverside language of choice.  What is UberUploadCropper?  It is a jQuery plugin which pulls together jCrop, Impromptu, and FileUploader plugins into one uniform unit to upload and crop images.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/12/uberuploadcropper-v2.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/12/uberuploadcropper-v2.png" alt="" title="UberUploadCropper V2" width="509" height="98" class="size-full wp-image-1057" /></a></p><p>The latest version can be found with all it&#8217;s glory on Github, along with 2 examples. The examples provide a very basic, upload and crop routine.  The second, a much more advanced example, demonstrates how to handle large images efficiently.  Both examples should be fairly easy to merge into your own projects.  Here is a video of <a
href="http://trentrichardson.com/2009/10/25/uberuploadcropper-jquery-upload-and-crop-plugin/" title="UberUploadCropper V1" target="_blank">version 1 of UberUploadCropper</a> in action.  I will provide a newer video shortly:</p><p><iframe
width="420" height="315" src="http://www.youtube.com/embed/1ofL8K74imc?rel=0" frameborder="0" allowfullscreen></iframe></p><p>This plugin uses these three fantastic plugins:</p><ul><li><a
href="http://trentrichardson.com/Impromptu/" title="jQuery Impromptu" target="_blank">jQuery Impromptu</a> for modal windows.</li><li><a
href="https://github.com/tapmodo/Jcrop" title="Jcrop" target="_blank">Jcrop</a> to crop the images.</li><li><a
href="http://github.com/valums/file-uploader" title="FileUploader" target="_blank">FileUploader</a> to upload the images.</li></ul><p>The plugins mostly differ in using ajax upload instead of Uploadify.  So all options which use to target Uploadify have been removed and replaced with the corresponding FileUploader options.  The examples are commented and should be pretty clear cut.  Enjoy!</p><p><a
href="https://github.com/trentrichardson/UberUploadCropper" title="UberUploadCropper on Github" target="_blank">UberUploadCropper on Github</a></p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2010/04/12/uberuploadcropper-0-2-with-example/' rel='bookmark' title='UberUploadCropper 0.2 With Example'>UberUploadCropper 0.2 With Example</a></li><li><a
href='http://trentrichardson.com/2008/05/21/javascript-finding-the-focused-element/' rel='bookmark' title='Javascript: Finding the Focused Element'>Javascript: Finding the Focused Element</a></li><li><a
href='http://trentrichardson.com/2011/10/14/impromptu-3-2-mobile-jquery-prompts/' rel='bookmark' title='Impromptu 3.2 &#8211; Mobile jQuery Prompts'>Impromptu 3.2 &#8211; Mobile jQuery Prompts</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/20/uberuploadcropper-v2-upload-crop-no-flash/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Clientside Plugin Available for Gedit 3</title><link>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/</link> <comments>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/#comments</comments> <pubDate>Thu, 15 Dec 2011 11:34:57 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[clientside]]></category> <category><![CDATA[format]]></category> <category><![CDATA[gedit]]></category> <category><![CDATA[lint]]></category> <category><![CDATA[minify]]></category> <category><![CDATA[plugin]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1053</guid> <description><![CDATA[The Gedit Clientside plugin is now available for Gedit 3. All the features remained the same, just some minor tweaks throughout. You can still find both Gedit versions of the plugin on Github: Clientside Plugin for Gedit 3+ Clientside Plugin for Gedit 2 I moved the old Gedit 2 version to a separate branch on [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol>]]></description> <content:encoded><![CDATA[<p>The Gedit Clientside plugin is now available for Gedit 3.  All the features remained the same, just some minor tweaks throughout.  You can still find both Gedit versions of the plugin on Github:</p><ul><li><a
href="https://github.com/trentrichardson/Gedit-Clientside-Plugin" title="Clientside Plugin for Gedit 3+" target="_blank">Clientside Plugin for Gedit 3+</a></li><li><a
href="https://github.com/trentrichardson/Gedit-Clientside-Plugin/tree/Gedit2" title="Clientside Plugin for Gedit 2" target="_blank">Clientside Plugin for Gedit 2</a></li></ul><p>I moved the old Gedit 2 version to a separate branch on Github, so both versions of the project are still available.</p><p>If you&#8217;re unfamiliar with the Clientside plugin you just found a real gem.  The plugin bundles together functionality to minify, format, batch minify, and run a lint service on both Javascript and CSS.  Hope you enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/03/02/gedit-clientside-plugin-gets-batch-minify-option/' rel='bookmark' title='Gedit Clientside Plugin gets Batch Minify Option'>Gedit Clientside Plugin gets Batch Minify Option</a></li><li><a
href='http://trentrichardson.com/2010/11/30/gedit-clientside-plugin/' rel='bookmark' title='Gedit Clientside Plugin'>Gedit Clientside Plugin</a></li><li><a
href='http://trentrichardson.com/2011/09/23/updated-lint-for-clientside/' rel='bookmark' title='Updated Lint for Clientside'>Updated Lint for Clientside</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/15/clientside-plugin-available-for-gedit-3/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>jQuery Timepicker Addon 0.9.8 Available</title><link>http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/</link> <comments>http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/#comments</comments> <pubDate>Wed, 07 Dec 2011 11:18:24 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Timepicker]]></category> <category><![CDATA[date]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[localizations]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[picker]]></category> <category><![CDATA[time]]></category> <category><![CDATA[touch]]></category> <category><![CDATA[translations]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1049</guid> <description><![CDATA[A new jQueryUI Timepicker Addon is now available. With this release comes many additions, including support for touch/mobile devices through integration with the sliderAccess plugin. Here is an overview list of the updates: Fix Daylight Savings bug. Fix and Add several localizations/translations. Fixed getter/setter bug. Fixed timepicker update issue with undefined &#8220;inst&#8221;. Updated CSS and [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/04/jquery-timepicker-addon-0-9-7-now-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.7 Now Available'>jQuery Timepicker Addon 0.9.7 Now Available</a></li><li><a
href='http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/' rel='bookmark' title='Add UI-Slider Accessibility to Timepicker'>Add UI-Slider Accessibility to Timepicker</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li></ol>]]></description> <content:encoded><![CDATA[<p>A new <a
href="http://trentrichardson.com/examples/timepicker/" title="jQuery Timepicker Addon">jQueryUI Timepicker Addon</a> is now available.  With this release comes many additions, including support for touch/mobile devices through <a
href="http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/" title="Timepicker Addon integration with sliderAccess for Touch and Mobile Devices">integration with the sliderAccess plugin</a>.  Here is an overview list of the updates:</p><ul><li>Fix Daylight Savings bug.</li><li>Fix and Add several localizations/translations.</li><li>Fixed getter/setter bug.</li><li>Fixed timepicker update issue with undefined &#8220;inst&#8221;.</li><li>Updated CSS and generated markup.</li><li>Added integration with sliderAccess for touch devices.</li></ul><p>As always feel free to check out <a
href="https://github.com/trentrichardson/jQuery-Timepicker-Addon" title="Timepicker on Github" target="_blank">timepicker on Github</a>.  If you&#8217;re upgrading be sure to grab the new CSS, as the markup generated has been changed.  Hope you enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/04/jquery-timepicker-addon-0-9-7-now-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.7 Now Available'>jQuery Timepicker Addon 0.9.7 Now Available</a></li><li><a
href='http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/' rel='bookmark' title='Add UI-Slider Accessibility to Timepicker'>Add UI-Slider Accessibility to Timepicker</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/feed/</wfw:commentRss> <slash:comments>36</slash:comments> </item> <item><title>Add UI-Slider Accessibility to Timepicker</title><link>http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/</link> <comments>http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/#comments</comments> <pubDate>Mon, 05 Dec 2011 11:18:10 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Javascript]]></category> <category><![CDATA[Timepicker]]></category> <category><![CDATA[accessibility]]></category> <category><![CDATA[datetimepicker]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[slider]]></category> <category><![CDATA[touch]]></category> <category><![CDATA[ui]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1035</guid> <description><![CDATA[You knew it was coming! An example of integrating my jQuery UI Slider Touch Accessibility addon to the jQuery Timepicker Addon. Before getting started I must note that this currently will only work with the latest Timepicker (version 0.9.8+). I had to clean up the markup generated in timepicker to make this easier, as well [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.8 Available'>jQuery Timepicker Addon 0.9.8 Available</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://trentrichardson.com/wp-content/uploads/2011/12/timepicker-accessibility.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/12/timepicker-accessibility.png" alt="" title="Timepicker with Slider Accessibility" width="200" height="285" class="alignright size-full wp-image-1036" /></a></p><p>You knew it was coming! An example of integrating my <a
href="http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/" title="jQueryUI Slider Touch Accessibility Plugin">jQuery UI Slider Touch Accessibility addon</a> to the jQuery Timepicker Addon.  Before getting started I must note that this currently will only work with the <a
href="http://trentrichardson.com/examples/timepicker/" title="Get the latest Timepicker Addon" target="_blank">latest Timepicker (version 0.9.8+)</a>.  I had to clean up the markup generated in timepicker to make this easier, as well as other adjustments (Thanks to Dana over on the sliderAccess post).</p><p>First, start off with a normal timepicker.  This means include all the scripts and initiate (jquery, ui, timepicker, and sliderAccess plugin):</p><p>The HTML:</p><pre><code class="html">
&lt;div id="datepicker"&gt;&lt;/div&gt;
</code></pre><p>The JS:</p><pre><code class="js">
$('#datepicker').datetimepicker({});
</code></pre><p>Ok, with the newest timepicker addon there are two new options, addSliderAccess (true/false), and sliderAccessArgs (object of sliderAccess options).  Now we can attach our accessibility addon for touch devices:</p><pre><code class="js">
$('#datepicker').datetimepicker({
	addSliderAccess: true,
	sliderAccessArgs: { touchonly: false }
})
</code></pre><p>These two new options are solely for sliderAccess, and will attach it to any visible slider.  I passed in the touchonly option just so its immediately visible to you that it is installed.  In production you may want to either set to true or omit passing this option.  Then it will only be visible when a touch device is present.</p><p>Wow! Thats it!  Check with the <a
href="http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/" title="jQuery UI Slider Touch Accessibility Addon">Slider Accessibility docs</a> for more options.  I have also added this example to the <a
href="http://trentrichardson.com/examples/timepicker/" title="Timepicker Documentation" target="_blank">timepicker documentation</a>. Enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.8 Available'>jQuery Timepicker Addon 0.9.8 Available</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>Discussion &#8211; How Asynchronous Should We Get</title><link>http://trentrichardson.com/2011/12/02/discussion-how-asynchronous-should-we-get/</link> <comments>http://trentrichardson.com/2011/12/02/discussion-how-asynchronous-should-we-get/#comments</comments> <pubDate>Fri, 02 Dec 2011 11:06:51 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Javascript]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[async]]></category> <category><![CDATA[asyncronous]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=1027</guid> <description><![CDATA[I recently read an article about turning the &#8220;asynchronous-ness&#8221; up a notch. His reasoning was very good, response times keep users on the site longer. Lets go in to more detail. Ajax requests allow users to stay on the same page, while the site contacts the server in the background. This may be to post [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/06/30/clientside-discussion/' rel='bookmark' title='Clientside Discussion'>Clientside Discussion</a></li><li><a
href='http://trentrichardson.com/2011/06/10/filter-select-dropdowns-as-you-type/' rel='bookmark' title='Filter Select Dropdowns as You Type'>Filter Select Dropdowns as You Type</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I recently <a
href="http://alexmaccaw.co.uk/posts/async_ui" target="_blank">read an article</a> about turning the &#8220;asynchronous-ness&#8221; up a notch.  His reasoning was very good, response times keep users on the site longer.  Lets go in to more detail.</p><p>Ajax requests allow users to stay on the same page, while the site contacts the server in the background.  This may be to post some information, or retrieve information, and the polite thing to do these days is to indicate to the user &#8220;Yes, we&#8217;re processing your request, please wait..&#8221;.  But the claim here is there is no need to keep the user waiting.  It&#8217;s pointless and they may as well have done a complete page reload.</p><p>Since we can use asynchronous requests the user can continue what they were doing, while the page request runs in the background.  This makes the response &#8220;feel&#8221; faster to the user, even though it may not technically be.  Now the problem comes in when the user navigates the browser away from the page before an ajax request has completed, causing data incomplete data, or loss of data.  Where is the line drawn where it is &#8220;safe&#8221; to use this method.  To keep all data integrity I would have to say never.</p><p>However, I&#8217;m not going to say &#8220;never&#8221;.  Fact I believe with a little though we can avoid this almost always.  He notes that Google Mail nicely displays a message which is visible, but not in the way of the user moving on to their next task.  And although its ugly we could easily add onbeforeunload listeners to warn the user about navigating away from the page, then remove the listener when the request successfully completes.</p><p>So my thoughts are, why not?</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/06/30/clientside-discussion/' rel='bookmark' title='Clientside Discussion'>Clientside Discussion</a></li><li><a
href='http://trentrichardson.com/2011/06/10/filter-select-dropdowns-as-you-type/' rel='bookmark' title='Filter Select Dropdowns as You Type'>Filter Select Dropdowns as You Type</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/12/02/discussion-how-asynchronous-should-we-get/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>jQuery UI Sliders and Touch Accessibility</title><link>http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/</link> <comments>http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/#comments</comments> <pubDate>Fri, 11 Nov 2011 11:32:40 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Javascript]]></category> <category><![CDATA[button]]></category> <category><![CDATA[event]]></category> <category><![CDATA[ipad]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[slider]]></category> <category><![CDATA[touch]]></category> <category><![CDATA[ui]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=997</guid> <description><![CDATA[jQuery UI is now a main stream user interface toolkit. It works most everywhere, but touch devices currently struggle with some of it&#8217;s widgets, including the Slider. The problem is touch and drag events can get mixed up between the web page and the browser. In other words when does a swipe indicate to scroll [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/' rel='bookmark' title='Add UI-Slider Accessibility to Timepicker'>Add UI-Slider Accessibility to Timepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li><li><a
href='http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.8 Available'>jQuery Timepicker Addon 0.9.8 Available</a></li></ol>]]></description> <content:encoded><![CDATA[<p>jQuery UI is now a main stream user interface toolkit.  It works most everywhere, but touch devices currently struggle with some of it&#8217;s widgets, including the Slider.  The problem is touch and drag events can get mixed up between the web page and the browser.  In other words when does a swipe indicate to scroll the page or slider adjustment.  Currently after a couple searches there are a couple attempts to fix this without much effort beyond including a javascript file:</p><ul><li><a
href="http://furf.com/exp/touch-punch/" title="Touch Punch" target="_blank">Touch Punch</a></li><li><a
href="http://code.google.com/p/jquery-ui-for-ipad-and-iphone/" title="jQuery.UI.iPad plugin" target="_blank">jQuery.UI.iPad plugin</a></li></ul><p>Essentially these two plugins listen for touch events and pass the event on to jQuery UI so they can be processed.  But still these can be cumbersome in my findings.  So I&#8217;ve come up with a quick solution.</p></p><p>When we use a slider, and touch events are available we know it is a touch device, so we can insert a couple jQuery UI buttons to increment and decrement the sliders.</p><p><a
href="http://trentrichardson.com/wp-content/uploads/2011/11/jquery-ui-slider-access.png"><img
src="http://trentrichardson.com/wp-content/uploads/2011/11/jquery-ui-slider-access.png" alt="Add Accessibility to jQuery UI Slider for Touch Devices" title="jquery-ui-slider-access" width="330" height="48" class="size-full wp-image-998" /></a></p><p>Adding this ability can be as simple as one more method chained after your slider:</p><pre><code class="js">
$('#slider').slider().sliderAccess();
</code></pre><p>On top of that if you want it to always show, even when it&#8217;s not a touch enabled device, you can specify that as well:</p><pre><code class="js">
$('#slider').slider().sliderAccess({ touchonly : false });
</code></pre><p>Ok, so you this is easy enough to use, lets see the goods:</p><pre><code class="js">
/*
 * jQuery UI Slider Access
 * By: Trent Richardson [http://trentrichardson.com]
 * Version 0.2
 * Last Modified: 12/12/2011
 *
 * Copyright 2011 Trent Richardson
 * Dual licensed under the MIT and GPL licenses.
 * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
 * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
 *
 */
 (function ($) {

 	$.fn.extend({
 		sliderAccess: function (options) {
 			options = options || {};
 			options.touchonly = options.touchonly !== undefined ? options.touchonly : true; // by default only show it if touch device

 			if (options.touchonly === true &#038;&#038; !("ontouchend" in document))
 				return $(this);

 			return $(this).each(function (i, obj) {
 				var $t = $(this),
 				    o = $.extend({}, {
		 				    	where: 'after',
		 				    	step: $t.slider('option', 'step'),
		 				    	upIcon: 'ui-icon-plus',
		 				    	downIcon: 'ui-icon-minus',
		 				    	text: false,
		 				    	upText: '+',
		 				    	downText: '-',
		 				    	buttonset: true,
		 				    	buttonsetTag: 'span',
		 				    	speed: 150
	 				    }, options),
 				    $buttons = $('&lt;' + o.buttonsetTag + ' class="ui-slider-access"&gt;' +
 				    	'&lt;button data-icon="' + o.downIcon + '" data-step="-' + o.step + '"&gt;' + o.downText + '&lt;/button&gt;' +
 				    	'&lt;button data-icon="' + o.upIcon + '" data-step="' + o.step + '"&gt;' + o.upText + '&lt;/button&gt;' +
 				    	'&lt;/' + o.buttonsetTag + '&gt;');

 				$buttons.children('button').each(function (j, jobj) {
 					var $jt = $(this),
 						timeout = null,
 						increment = function($jt, $t, e) {
						 		var step = $jt.data('step'),
									curr = $t.slider('value'),
									newval = curr += step * 1,
									minval = $t.slider('option', 'min'),
									maxval = $t.slider('option', 'max');
								e.preventDefault();
								if (newval &lt; minval || newval &gt; maxval)
									return;
								$t.slider('value', newval);
								$t.slider("option", "slide").call($t, null, { value: newval });
						 	};

 					$jt.button({
 						text: o.text,
 						icons: { primary: $jt.data('icon') }
 					})
 					.bind('touchstart mousedown', function (e) {
 						increment($jt, $t, e);
 						timeout = setInterval(function () {
 							increment($jt, $t, e);
 						}, o.speed);
 					});

 					$(document).bind('touchend mouseup', function () {
	 						clearInterval(timeout);
	 						return false;
	 					});

 				});

 				// before or after
 				$t[o.where]($buttons);

 				if (o.buttonset) {
 					$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();
 					$buttons.eq(0).addClass('ui-corner-left');
 					$buttons.eq(1).addClass('ui-corner-right');
 				}

 				// adjust the width so we don't break the original layout
 				var bOuterWidth = $buttons.css({
 					marginLeft: (o.where == 'after' ? 10 : 0),
 					marginRight: (o.where == 'before' ? 10 : 0)
 				}).outerWidth(true) + 5;
 				var tOuterWidth = $t.outerWidth(true);
 				$t.css('display', 'inline-block').width(tOuterWidth - bOuterWidth);
 			});
 		}
 	});

 })(jQuery);
</code></pre><p>A quick look at the source and you will notice I also threw in a few options to make things more versital.  The options are:</p><ul><li><strong>touchonly</strong> &#8211; true/false &#8211; Show this control Only for touch devices.</li><li><strong>where</strong> &#8211; before/after &#8211; Show this control before or after the slider.</li><li><strong>step</strong> &#8211; [0-9]+ &#8211; How much each button press increments.  Defaults to slider step.</li><li><strong>upIcon</strong> &#8211; one of ui icon names &#8211; defaults to &#8220;ui-icon-plus&#8221;.</li><li><strong>downIcon</strong> &#8211; one of ui icon names &#8211; defaults to &#8220;ui-icon-minus&#8221;.</li><li><strong>text</strong> &#8211; true/false &#8211; Show text in buttons?</li><li><strong>upText</strong> &#8211; string &#8211; Text of up button, default is &#8220;+&#8221;.</li><li><strong>downText</strong> &#8211; string &#8211; Text of down button, default is &#8220;-&#8221;.</li><li><strong>buttonset</strong> &#8211; true &#8211; Wrap the button in a button set?</li><li><strong>buttonsetTag</strong> &#8211; tagName &#8211; element type to wrap the buttons with, default is &#8220;span&#8221;.</li><li><strong>speed</strong> &#8211; [0-9]+ &#8211; Interval speed on touch-hold or click-hold to increment, default is 150</li></ul><p>It should also be noted that for this plugin to work you will need to include the button widget in your jQueryUI build.  From there we handle the rest.  When a button is clicked the change event will be fired through the slider, however the slide event will not.  This plugin makes no attempt to stop the click event on the buttons, so if you need to catch these events since there is not slide event you may do it the natural way.</p><p>One final note for this plugin.  It is small, I will likely not be making many updates to it.  If you need to tweak something feel free, and if you like post your changes here.  I may integrate it if I see the need.  The downfall and updside is as time passes jQueryUI will likely improve their support, so this plugin will become irrelevant.  Enjoy!</p><p><strong>Last updated: 2011-12-12</strong></p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/12/05/add-ui-slider-accessibility-to-timepicker/' rel='bookmark' title='Add UI-Slider Accessibility to Timepicker'>Add UI-Slider Accessibility to Timepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li><li><a
href='http://trentrichardson.com/2011/12/07/jquery-timepicker-addon-0-9-8-available/' rel='bookmark' title='jQuery Timepicker Addon 0.9.8 Available'>jQuery Timepicker Addon 0.9.8 Available</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Impromptu 3.2 Gets Quick Update</title><link>http://trentrichardson.com/2011/11/04/impromptu-3-2-gets-quick-update/</link> <comments>http://trentrichardson.com/2011/11/04/impromptu-3-2-gets-quick-update/#comments</comments> <pubDate>Fri, 04 Nov 2011 11:20:29 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Impromptu]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[alert]]></category> <category><![CDATA[confirm]]></category> <category><![CDATA[form]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[lighbox]]></category> <category><![CDATA[modal]]></category> <category><![CDATA[overlay]]></category> <category><![CDATA[prompt]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=994</guid> <description><![CDATA[If you recently downloaded Impromptu 3.2, you may want to grab it again. A small bug was fixed. I didn&#8217;t find it worth while to create a new version, it was a line of code. On top of that the bug was merely a visual detail, and not critical. Long story short the overlay always [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/14/impromptu-3-2-mobile-jquery-prompts/' rel='bookmark' title='Impromptu 3.2 &#8211; Mobile jQuery Prompts'>Impromptu 3.2 &#8211; Mobile jQuery Prompts</a></li><li><a
href='http://trentrichardson.com/2010/04/01/impromptu-3-1-is-here/' rel='bookmark' title='Impromptu 3.1 is Here'>Impromptu 3.1 is Here</a></li><li><a
href='http://trentrichardson.com/2011/06/20/jquery-impromptu-now-on-github/' rel='bookmark' title='jQuery Impromptu Now on Github'>jQuery Impromptu Now on Github</a></li></ol>]]></description> <content:encoded><![CDATA[<p>If you recently downloaded Impromptu 3.2, you may want to grab it again.  A small bug was fixed.  I didn&#8217;t find it worth while to create a new version, it was a line of code.  On top of that the bug was merely a visual detail, and not critical.  Long story short the overlay always stopped a few pixels short of the bottom of the document.  Thanks to the users for catching this!  Enjoy!</p><p><a
href="http://trentrichardson.com/Impromptu/" title="jQuery Impromptu Download and Documentation">jQuery Impromptu Download and Docuentation</a></p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/10/14/impromptu-3-2-mobile-jquery-prompts/' rel='bookmark' title='Impromptu 3.2 &#8211; Mobile jQuery Prompts'>Impromptu 3.2 &#8211; Mobile jQuery Prompts</a></li><li><a
href='http://trentrichardson.com/2010/04/01/impromptu-3-1-is-here/' rel='bookmark' title='Impromptu 3.1 is Here'>Impromptu 3.1 is Here</a></li><li><a
href='http://trentrichardson.com/2011/06/20/jquery-impromptu-now-on-github/' rel='bookmark' title='jQuery Impromptu Now on Github'>jQuery Impromptu Now on Github</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/11/04/impromptu-3-2-gets-quick-update/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Creating a DateTime Range with Timepicker</title><link>http://trentrichardson.com/2011/10/21/creating-a-datetime-range-with-timepicker/</link> <comments>http://trentrichardson.com/2011/10/21/creating-a-datetime-range-with-timepicker/#comments</comments> <pubDate>Fri, 21 Oct 2011 11:07:19 +0000</pubDate> <dc:creator>trent</dc:creator> <category><![CDATA[Javascript]]></category> <category><![CDATA[Timepicker]]></category> <category><![CDATA[date]]></category> <category><![CDATA[jquery]]></category> <category><![CDATA[picker]]></category> <category><![CDATA[range]]></category> <category><![CDATA[time]]></category><guid
isPermaLink="false">http://trentrichardson.com/?p=986</guid> <description><![CDATA[I&#8217;ve had a lot of users recently asking how to create a date/time range using the timepicker addon. Currently the jQuery UI documentation has an example using just datepicker, but it won&#8217;t quite work the same when using the timepicker. Why? The example from the jQuery UI docs explicitly only sets the date. But never [...]
Related posts:<ol><li><a
href='http://trentrichardson.com/2011/09/29/looping-through-dates-with-javascript/' rel='bookmark' title='Looping Through Dates with Javascript'>Looping Through Dates with Javascript</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li></ol>]]></description> <content:encoded><![CDATA[<p>I&#8217;ve had a lot of users recently asking how to create a date/time range using the <a
href="http://trentrichardson.com/examples/timepicker/" title="jQuery UI Timepicker Addon">timepicker addon</a>.  Currently the jQuery UI documentation has an <a
href="http://jqueryui.com/demos/datepicker/#date-range" title="Datepicker" target="_blank">example using just datepicker</a>, but it won&#8217;t quite work the same when using the timepicker.  Why?  The example from the jQuery UI docs explicitly only sets the date.  But never fear, we can just as easily (if not easier) accomplish the same with Timepicker Addon.  Lets start with a couple inputs:</p><pre><code class="html">
&lt;input type="text" id="startDate" name="startDate" value="" /&gt;
&lt;input type="text" id="endDate" name="endDate" value="" /&gt;
</code></pre><p>Ok, we have two inputs, one for the start datetime, and one for the end datetime.  Now to make this work correctly, when start date is updated, we need to set the &#8220;minDate&#8221; of the end date.  And in reverse when end date is updated we need to set the &#8220;maxDate&#8221; on the start date.  Here is how we do this:</p><pre><code class="js">
$('#startDate').datetimepicker({
	onSelect: function (selectedDateTime){
		var start = $(this).datetimepicker('getDate');
		$('#endDate').datetimepicker('option', 'minDate', new Date(start.getTime()) );
	}
});

$('#endDate').datetimepicker({
	onSelect: function (selectedDateTime){
		var end = $(this).datetimepicker('getDate');
		$('#startDate').datetimepicker('option', 'maxDate', new Date(end.getTime()) );
	}
});
</code></pre><p>Pretty straight forward.  You could consolidate it all like on the datepicker example, but I decided to break it out for simplicity.  Now lets add one more step, courtesy of Dana in the comments.  We need set the opposite input date when either picker closes with a date, so lets do that:</p><pre><code class="js">
$('#startDate').datetimepicker({
	onClose: function(dateText, inst) {
		var endDateTextBox = $('#endDate');
		if (endDateTextBox.val() != '') {
			var testStartDate = new Date(dateText);
			var testEndDate = new Date(endDateTextBox.val());
			if (testStartDate &gt; testEndDate)
				endDateTextBox.val(dateText);
		}
		else {
			endDateTextBox.val(dateText);
		}
	},
	onSelect: function (selectedDateTime){
		var start = $(this).datetimepicker('getDate');
		$('#endDate').datetimepicker('option', 'minDate', new Date(start.getTime()));
	}
});
$('#endDate').datetimepicker({
	onClose: function(dateText, inst) {
		var startDateTextBox = $('#startDate');
		if (startDateTextBox.val() != '') {
			var testStartDate = new Date(startDateTextBox.val());
			var testEndDate = new Date(dateText);
			if (testStartDate &gt; testEndDate)
				startDateTextBox.val(dateText);
		}
		else {
			startDateTextBox.val(dateText);
		}
	},
	onSelect: function (selectedDateTime){
		var end = $(this).datetimepicker('getDate');
		$('#startDate').datetimepicker('option', 'maxDate', new Date(end.getTime()) );
	}
});
</code></pre><p>I will be adding this example to the <a
href="http://trentrichardson.com/examples/timepicker/" title="jQuery Timepicker Documentation">documentation</a> as well for reference.  Hope you enjoy!</p><p>Related posts:<ol><li><a
href='http://trentrichardson.com/2011/09/29/looping-through-dates-with-javascript/' rel='bookmark' title='Looping Through Dates with Javascript'>Looping Through Dates with Javascript</a></li><li><a
href='http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/' rel='bookmark' title='Timepicker Addon for jQuery UI Datepicker'>Timepicker Addon for jQuery UI Datepicker</a></li><li><a
href='http://trentrichardson.com/2011/08/31/adding-tooltip-to-timepicker-sliders/' rel='bookmark' title='Adding Tooltip to Timepicker Sliders'>Adding Tooltip to Timepicker Sliders</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://trentrichardson.com/2011/10/21/creating-a-datetime-range-with-timepicker/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/113 queries in 0.065 seconds using disk: basic
Object Caching 2785/2933 objects using disk: basic

Served from: trentrichardson.com @ 2012-02-03 22:32:43 -->
