I''ve been trying to find a date picker that works really well with Rails. I''ve looked into the following thus far: jMaki Widget jQuery.datepicker jRails jQuery.datepicker However, none of these provide any information on how to use them with Rails. I''ve scrounged the web for tutorials or any information about jQuery but most are either very out of date, or don''t have any substance that I can work through. Can anyone recommend something that will allow me to do the following: User visits "x" page that contains a pre-populated table view. User clicks on "y" button/widget/etc. User selects a date (either from a drop down or a calendar widget) Date is sent to a find/search parameter. Data for the pre-populated table view is refreshed to show the new criteria based on date. I would believe that people who use rails would be using many types of datepickers/selectors/etc. I''m surprised to see that there is very little documentation about this area. Rails and ajax go hand in hand.. Maybe my google is broke... -- Posted via http://www.ruby-forum.com/.
Älphä Blüë wrote:> I''ve been trying to find a date picker that works really well with > Rails. I''ve looked into the following thus far: > > jMaki Widget jQuery.datepicker > jRails jQuery.datepicker > > However, none of these provide any information on how to use them with > Rails.Every JS date picker I''m aware of populates a form field. Just submit the form containing that field, and you''ll get the data you want. There''s nothing magical about it. [...]> I''m surprised to see that there is very > little documentation about this area.There''s really nothing to document, provided you understand how forms are submitted in Rails.> Rails and ajax go hand in hand..Not really. Rails provides a few canned Ajax helpers (that probably should be avoided in any case -- or used with lowpro -- since they generate inline JS), and deals nicely with XML and JSON requests, but that''s about it. (I''ve done complex Ajax development, but never with Rails.)> > Maybe my google is broke...No, I think you''re looking for an explanation of something that''s too trivial for most people to write about. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Hi Marnen, Yeah I suppose I should have been more precise as to what I was trying to find. I did find something that will work with what I''m after: http://agilewebdevelopment.com/plugins/calendariffic_0_1_0 I wanted something that worked as a widget that had a nice theme, was easy to style, and easy to date convert. Using this I can do the following: <%= calendariffic_input(false, :compiled_on, ''calendariffic/date.png'', ''search_cal'', ''%Y-%m-%d'', @todays_date, {}, {:class => ''borderless''}) %> Pretty easy method call and the documentation in the file matches something I can read pretty easily. I changed the dateformat, the name/id, and can pass this along to my named_scope to generate the date. Now I just have to figure out whether I need to use an actual submit button or whether I can find something that works like an OnChange or an observer method. I''d like it so that when someone presses the calendar widget and selects the date, a notifier method changes the data.. I''ll look into it.. -- Posted via http://www.ruby-forum.com/.