<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
		<link>http://railsforum.com/viewtopic.php?id=47494</link>
		<description><![CDATA[The most recent posts in Jquery datepicker and Rails 3.1.3 SOLVED.]]></description>
		<lastBuildDate>Mon, 22 Apr 2013 10:13:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=161876#p161876</link>
			<description><![CDATA[<p>Thanks, it was very helpful to me. <a href="http://creditzone.pl">Doradca kredytowy</a></p>]]></description>
			<author><![CDATA[dummy@example.com (creditzone)]]></author>
			<pubDate>Mon, 22 Apr 2013 10:13:38 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=161876#p161876</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=152714#p152714</link>
			<description><![CDATA[<div class="quotebox"><cite>fuzzytom wrote:</cite><blockquote><p>Cool .<a href="http://www.jakpoderwacdziewczyne.net/">.</a>. thanks a bunch Brad. I am going to apply that rule to my css<a href="http://dieta-dukana.biz.pl/">.</a></p><p>fuzzy.</p></blockquote></div><p>I was looking for this for over 30 minutes now, thanks a lot Brad and I&#039;m glad that I have found this website!</p>]]></description>
			<author><![CDATA[dummy@example.com (Smily)]]></author>
			<pubDate>Tue, 22 May 2012 17:30:29 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=152714#p152714</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148597#p148597</link>
			<description><![CDATA[<p>Cool ... thanks a bunch Brad. I am going to apply that rule to my css.</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Thu, 12 Jan 2012 17:48:04 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148597#p148597</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148549#p148549</link>
			<description><![CDATA[<p>You just have to get the hang of it.&nbsp; You can edit the query-ui-X.X.X.custom.css file,&nbsp; but if you look at it, it&#039;s mostly color, font-family, font-size , borders, background, etc.&nbsp; You just have to learn to NOT deal with those css style elements in your own css.</p><p>As a general rule jquery-ui does nothing with &lt;div&gt;,&nbsp; and the only jquery-ui css class you&#039;d ever assign to a div is ui-widget,&nbsp; all the rest tend to go on input elements.&nbsp; I tend to use it like so:<br /></p><div class="codebox"><pre><code>&lt;div class=&quot;ui-widget&quot;&gt;
  &lt;ul class=&quot;myULstyle&quot;&gt;
    &lt;li class=&quot;myLIstyle&quot;&gt;
      &lt;%= f.text_field :name , :class=&gt;&quot;ui-state-default&quot; %&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</code></pre></div><p>So MYstyles control the spacing between input fields, etc.,&nbsp; and jquery-ui handles font-size, color, background.&nbsp; &nbsp;And they normally don&#039;t collide with each other.</p>]]></description>
			<author><![CDATA[dummy@example.com (BradHodges)]]></author>
			<pubDate>Wed, 11 Jan 2012 21:38:15 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148549#p148549</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148547#p148547</link>
			<description><![CDATA[<p>Thanks again Brad,</p><p>I created a new images folder underneath the stylesheets folder, as you advised, and put all of the jquery images in it. Now all the jquery images are being served.</p><p>As for the date fields being pushed onto a new line all by themself due to the jquery-ui-1.8.16.custom.css styling overriding my custom styling, I just made sure that the date fields were cushioned in between two other fields and thereby insured that they did not spill over onto a new line all by themselves.</p><p>I guess that is not the best solution but it is the only way I could get it to work since I am not sure how to make my custom styling be the styling that governs the styling for the page whilst the jquery-ui-1.8.16.custom.css styling be responsible for the date input fields.</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Wed, 11 Jan 2012 19:55:24 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148547#p148547</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148474#p148474</link>
			<description><![CDATA[<p>If you&#039;ve set up the asset pipeline correctly,&nbsp; the only thing you need to do to bring in ALL your css is</p><p>&lt;%= stylesheet_link_tag&nbsp; &nbsp; &quot;application&quot; %&gt;</p><p>That assumes a simple css layout,&nbsp; when all your css is included on every page.</p>]]></description>
			<author><![CDATA[dummy@example.com (BradHodges)]]></author>
			<pubDate>Mon, 09 Jan 2012 23:21:57 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148474#p148474</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148473#p148473</link>
			<description><![CDATA[<p>Thanks Brad ... changing to&nbsp; (&quot;/assets ... .png&quot;) instead of (&quot;images/ ... .png&quot;) did it ... the asset pipeline works.</p><p>I then applied that same solution to the links in the _stylesheet partial and here instead of href=&quot;css/etc etc&quot; I used href=&quot;assets/etc etc&quot; and the same for src=&quot;assets/etc etc&quot;.</p><p>I now have the problem of the jquery-ui-1.8.16.custom.css styling overiding my date inputs and thereby moving them out of their current position.</p><p>I will do some research to see how to fix it but if I cannot find a solution I will make a new posting for this issue.</p><p>Thanks again,</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Mon, 09 Jan 2012 22:04:59 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148473#p148473</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148454#p148454</link>
			<description><![CDATA[<p>If you are on Rails 3.1.&nbsp; and you use the assets pipeline,&nbsp; </p><p>You&#039;d have to change</p><p>body {<br />&nbsp; &nbsp; background:&nbsp; &nbsp; &nbsp;#666 url(&quot;images/bg_diagonal.png&quot;) repeat 0 0;<br />&nbsp; &nbsp; color:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#fff;<br />}</p><p>to</p><p>body {<br />&nbsp; &nbsp; background:&nbsp; &nbsp; &nbsp;#666 url(&quot;/assets/bg_diagonal.png&quot;) repeat 0 0;<br />&nbsp; &nbsp; color:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#fff;<br />}</p><p>and you&#039;d have to put bg_diagonal.png in app/assets/images</p><p>Just see if you can get that to work.</p><p>Once the above works,&nbsp; you know the assets pipeline is set up correctly.</p><p>Then make sure that your custom theme is in:</p><p>app/assets/stylesheets</p><p>and make sure all the images that go along with the custom theme are in</p><p>app/assets/stylesheets/images.</p><p>The theme images would look like this for example</p><p>ui-bg_highlight-hard_75_b2c3d2_1x100.png</p><p>That&#039;s an example from my theme,&nbsp; yours would be ui-bg???????_??_??????_1x100.png&nbsp; for the image that defines a a background, it&#039;s a 1 wide by 100 pixel tall png.&nbsp; There should also be an icon file that looks like</p><p>ui-icons_??????_256x240.png</p><p>Give that a whirl!</p>]]></description>
			<author><![CDATA[dummy@example.com (BradHodges)]]></author>
			<pubDate>Mon, 09 Jan 2012 02:59:22 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148454#p148454</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148448#p148448</link>
			<description><![CDATA[<p>Hey Brad,</p><p>Just an update on my research. I still cannot get the theme to work....If I look at my server it seems that the theme is not being served.</p><p>On the jquery ui page they have a section called quick start guide, and in that section they suggest that the following needs to be on all your pages:</p><p>&nbsp; &nbsp; &lt;link type=&quot;text/css&quot; href=&quot;css/themename/jquery-ui-1.8.17.custom.css&quot; rel=&quot;Stylesheet&quot; /&gt;&nbsp; &nbsp; <br />&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.4.4.min.js&quot;&gt;&lt;/script&gt;<br />&nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-ui-1.8.17.custom.min.js&quot;&gt;&lt;/script&gt;</p><p>So I put these files in my partial _stylesheets.html.erb which comes from my site layout, application.html.erb.</p><p>Using firefox I was able to see that the link type, and the two script types did not work.</p><p>So, upon more researh I read that one should try instead the hosted themes on google. So I added this to my partial _stylesheets.html.erb:</p><p>&nbsp; &nbsp; &nbsp;&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/le-frog/jquery-ui.css&quot; &gt;</p><p>Again, using firefox, I found that this did not work.</p><p>So I removed everything and started from scratch and at your suggestion moved the jquery function out of the application.js file and put it in the employees.coffess.js file which was automatically created at the time I created the employee model.</p><p>app/assets/javascript/employees.coffee.js</p><p>&nbsp; &nbsp; $ -&gt; <br />&nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#employee_birth_date&quot;).datepicker()<br />&nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#employee_hire_date&quot;).datepicker()<br />&nbsp; &nbsp; &nbsp; &nbsp;$(&quot;#employee_term_date&quot;).datepicker()</p><p>And in my app/views/employees/new.html.haml file I have:</p><p>&nbsp; &nbsp; &nbsp;= f.label :name, &quot;Birth Date&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp;%br/<br />&nbsp; &nbsp; &nbsp;= f.text_field&nbsp; :birth_date, :size =&gt; 12, :class =&gt; &quot;ui-state-default&quot;</p><p>The :class =&gt; &quot;ui-state-default&quot; I added at your suggestion.</p><p>I then served up the new employees page and the jquery datepicker works without having to download datepicker and it is of the translucent, light blue style that I mentioned in my first post.</p><p>No matter what I try .... the theme does not work.</p><p>Just in passing, I also noticed that in my custom css file, that I have the exact same error when I try to serve a background image to my server. For instance:</p><p>body {<br />&nbsp; &nbsp; background:&nbsp; &nbsp; &nbsp;#666 url(&quot;images/bg_diagonal.png&quot;) repeat 0 0;<br />&nbsp; &nbsp; color:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#fff;<br />}</p><p>The error is that the image cannot be found and that their is no route etc etc which is the same error message that the link and script types got, that is, they are the three files that need to be on every page as suggested by jquery, that suggestion is the one&nbsp; which I started this post with.</p><p>If you have any thoughts as to where I should turn to next in order to resolve this issue, they would be appreciated.</p><p>Thanks for your help.</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Sun, 08 Jan 2012 19:07:16 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148448#p148448</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148344#p148344</link>
			<description><![CDATA[<p>Wow,</p><p>Thanks again Brad ... you have given me enough here to go to school on for a while.</p><p>I do have firebug and so I will be checking into the query-ui-classes and also using google to get a better understanding of the guidance you have shared with me.</p><p>Thanks again,</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Wed, 04 Jan 2012 21:40:55 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148344#p148344</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148343#p148343</link>
			<description><![CDATA[<p>I normally put query widget initialization directly in the view source via</p><p>&lt;script type &#039;text/javascript&#039;&gt;<br />&nbsp; $(document).ready(function() {<br />&nbsp; &nbsp; $(&#039;#employee_hire_date&#039;).datepicker();<br />&nbsp; });<br />&lt;/script&gt;</p><p>But that isn&#039;t your problem, if the date picker is working,&nbsp; just not themed.</p><p>Has you assigned class=&quot;ui-state-default&quot; to the element?</p><p>Also, I think it also has to have &quot;ui-widget&quot; on the outer most element containing any query-ui stuff.</p><p>Do you have firebug or some other page debugger?&nbsp; Check to see that you have the proper query-ui css classes assigned.</p>]]></description>
			<author><![CDATA[dummy@example.com (BradHodges)]]></author>
			<pubDate>Wed, 04 Jan 2012 21:08:20 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148343#p148343</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148342#p148342</link>
			<description><![CDATA[<p>Thanks Brad,</p><p>I have tried to do as you did, namely, put jquery-</p><p>ui-1.8.16.custom.min.js in:</p><p>app/assets/javascripts</p><p>And I put my theme in:</p><p>app/assets/stylesheets/jquery-ui-theme.css and as you I put all the images related to the theme in:</p><p>app/asset/images</p><p>but I cannot get the datepicker to reflect the theme I downloaded.</p><p>I did put the Jquery function for datepicker in the application.js since I do not know where else to put it?</p><p>Maybe that is causing the problem? </p><p>Any thoughts?</p><p>Thanks,</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Wed, 04 Jan 2012 18:56:58 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148342#p148342</guid>
		</item>
		<item>
			<title><![CDATA[Re: Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148338#p148338</link>
			<description><![CDATA[<p>I&#039;m on Rails 3.1.2 and ruby 1.9.2.</p><p>All I did was put query-ui-1.8.16.custom.min.js in:</p><p>app/assets/javascripts</p><p>And my theme is here:</p><p>app/assets/stylesheets/jquery-ui-theme.css</p><p>And all the images for the theme:</p><p>app/assets/stylesheets/images/ui-blahblah.png</p><p>I didn&#039;t touch application.js or application.css.</p><p>You have to remember to pre-compile the assets once you move to production.</p>]]></description>
			<author><![CDATA[dummy@example.com (BradHodges)]]></author>
			<pubDate>Wed, 04 Jan 2012 16:47:23 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148338#p148338</guid>
		</item>
		<item>
			<title><![CDATA[Jquery datepicker and Rails 3.1.3 SOLVED]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=148306#p148306</link>
			<description><![CDATA[<p>Hi,</p><p>I am using rails 3.1.3 and ruby 1.9.3-p0 as well as postgresql 9.1.</p><p>I am trying to use Jquery&#039; datepicker and I do have it working but just not to my satisfaction.</p><p>Here is what I have:</p><p>&nbsp; &nbsp; &nbsp;in my download file I have: css<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; development-bundle<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; js<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and an index.html file that tells me all that I downloaded. I choose the LeFrog theme.</p><p>&nbsp; &nbsp; In the css folder we have LeFrog and under it we have the jquery-ui-1.8.16.custom.css file which i moved to the app/assets/stylesheets directory and then in the application.css file I have <br />&nbsp; &nbsp; &nbsp; &nbsp;*= require_self<br />&nbsp; &nbsp; &nbsp; &nbsp;*= require_tree . <br />&nbsp; &nbsp; &nbsp; &nbsp;*= require jquery-ui-1.8.16.custom.css ... this line I added.<br />Also under the LeFrog directory we have an images folder and I moved it&#039;s contents into app/assets/images.</p><p>&nbsp; &nbsp;in app/assets/javascripts/application.js I added these lines:<br />&nbsp; &nbsp; $(function() {<br />&nbsp; &nbsp; $(&#039;#employee_birth_date&#039;).datepicker();<br />&nbsp; &nbsp; $(&#039;#employee_hire_date&#039;).datepicker();<br />&nbsp; &nbsp; $(&#039;#employee_term_date&#039;).datepicker();<br />});</p><p>also I did add the //= require jquery-ui line.</p><p>I gathered all of this from researching online and the datepicker does work but it is translucent and it does not refelect the theme that I downloaded.<br />Furthermore I am not sure what I should do, and where I should put the host of other files that came with the download.<br />For instance, in the js folder in the download directory we have jquery-1.6.2.min.js and jquery-ui-1.8.16.custom.min.js</p><p>Does anyone know where I should put these two files?<br />Reading the index.html file it seems that they have all of the information related to the theme I downloaded.</p><p>Lastly, can someone tell me what I do with the development-bundle that came with the download?</p><p>I have done a number of days of reading and researching but I am no clearer today than what I was a couple of days ago, well, not true ... I did learn how to get the datepicker to work but just not the theme that I choose.</p><p>Thanks for any help, suggestions or pointers or even further research you could point me towards.</p><p>fuzzy.</p>]]></description>
			<author><![CDATA[dummy@example.com (fuzzytom)]]></author>
			<pubDate>Tue, 03 Jan 2012 20:35:16 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=148306#p148306</guid>
		</item>
	</channel>
</rss>
