<?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>Digital Base - Blog &#187; dbFormExtraPlugin</title>
	<atom:link href="http://www.digitalbase.eu/blog/tag/dbformextraplugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalbase.eu/blog</link>
	<description>A blog about webdesign, PHP, development and IT</description>
	<lastBuildDate>Mon, 10 May 2010 16:16:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>using dbFormExtraPlugin for datepicker or datetimepicker</title>
		<link>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/</link>
		<comments>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 00:00:55 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dbFormExtraPlugin]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=208</guid>
		<description><![CDATA[For an internal web development project i was looking for a good date picker. I bounced onto sfFormExtraPlugin, but it took me a while to find the correct jquery &#38; jquery UI css &#38; javascript files and set the paths. I decided to create my owner datepicker based on the one in sfFormExtraPlugin (which was [...]]]></description>
			<content:encoded><![CDATA[<p>For an internal web development project i was looking for a good date picker. I bounced onto <a href="http://www.symfony-project.org/plugins/sfFormExtraPlugin" target="_blank">sfFormExtraPlugin</a>, but it took me a while to find the correct <a title="jquery" href="http://jquery.com/" target="_blank">jquery</a> &amp; <a href="http://ui.jquery.com/" target="_blank">jquery UI</a> css &amp; javascript files and set the paths. I decided to create my owner datepicker based on the one in sfFormExtraPlugin (which was based on the <a href="http://marcgrabanski.com/pages/code/jquery-ui-datepicker" target="_blank">jQuery UI Datepicker</a>).</p>
<p>As we already had a plugin containing some of the widgets/validators we are using for some of our webdesign projects, i decided to <a href="ww.symfony-project.org/plugins/dbFormExtraPlugin/0_0_5?tab=plugin_changelog" target="_blank">include</a> those widgets into t<a href="http://www.symfony-project.org/plugins/dbFormExtraPlugin" target="_blank">he existing one</a> named <a title="dbFormExtraPlugin" href="http://www.symfony-project.org/plugins/dbFormExtraPlugin" target="_blank">dbFormExtraPlugin</a>, original name, i know&#8230;</p>
<h2>Installing dbFormExtraPlugin</h2>
<p>It&#8217;s really this simple, install, publish assets, en clear your cache.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">symfony plugin:<span style="color: #c20cb9; font-weight: bold;">install</span> dbFormExtraPlugin <span style="color: #660033;">--release</span>=0.0.5
symfony plugin:publish-assets
symfony cache:<span style="color: #c20cb9; font-weight: bold;">clear</span></pre></div></div>

<h2>sfWidgetFormDateJQuery</h2>
<p>This is based on the normal <a href="http://marcgrabanski.com/pages/code/jquery-ui-datepicker" target="_blank">jQuery date picker</a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ProjectForm <span style="color: #000000; font-weight: bold;">extends</span> BaseProjectForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
&nbsp;
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'published_at'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormDateJQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Should give you something like this</p>
<p><img class="aligncenter size-full wp-image-214" title="sfwidgetformdatejquery" src="http://www.digitalbase.eu/blog/wp-content/uploads//2009/01/sfwidgetformdatejquery.png" alt="sfwidgetformdatejquery" width="580" height="271" /></p>
<h2>sfWidgetFormDateTimeDyn</h2>
<p>This is based on the <a title="DynDateTime - a date time slider for jQuery" href="http://code.google.com/p/dyndatetime/" target="_blank">dyndatetime project</a>, something i found on google code. From their website :</p>
<blockquote><p>jQuery has lots of date pickers, but no date- time pickers. This supports date and time, and renders the value to a single field in a configurable format.</p></blockquote>
<p>Use it like this</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ProjectForm <span style="color: #000000; font-weight: bold;">extends</span> BaseProjectForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'featured_at'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormDateTimeDyn<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Results in a popup, similar to the <a href="http://dynarch.com/projects/calendar/" target="_blank">dynarch calendar picker</a>, including time sliding capabilities !</p>
<p><img class="aligncenter size-full wp-image-215" title="sfwidgetformdatetimedyn" src="http://www.digitalbase.eu/blog/wp-content/uploads//2009/01/sfwidgetformdatetimedyn.png" alt="sfwidgetformdatetimedyn" width="534" height="295" /></p>
<p>I still have some work todo on configuration/customisation but it does work (out of the box).<br />
Other <a href="http://www.symfony-project.org/plugins/dbFormExtraPlugin/0_0_5?tab=plugin_installation" target="_blank">installation instructions here</a>. Comments welcome. Leave a message on this post, <a href="http://trac.symfony-project.org/newticket" target="_blank">post a bugticket</a> on the symfony trac or contact us by email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
