I have been trying to get one of the calender javascripts to work with the <%= form.text_field. So when the user pick the date it updates the time fields? (like in normal reservation system where you pick up the date and time from the calender and when user pick the selection it updates the field) but I could not get this to work. Does anyone have got something similar to work? or could someone help me with this. thanks -- Posted via http://www.ruby-forum.com/.
woow wrote:> I have been trying to get one of the calender javascripts to work with > the <%= form.text_field. So when the user pick the date it updates the > time fields? (like in normal reservation system where you pick up the > date and time from the calender and when user pick the selection it > updates the field) but I could not get this to work. > > Does anyone have got something similar to work? or could someone help me > with this. > > thanksany help???? -- Posted via http://www.ruby-forum.com/.
Hello, We use this calendar in our rails apps: http://dynarch.com/mishoo/calendar.epl>From below is taken from our views. We end up parsing the results (in thecase its called newSchDate) manually into our Activerecord date... <!-- calendar stylesheet --> <link rel="stylesheet" type="text/css" media="all" href="/calendar/calendar-win2k-1.css" title="blue" /> <!-- main calendar program --> <script type="text/javascript" src="/calendar/calendar.js"></script> <!-- language for the calendar --> <script type="text/javascript" src="/calendar/lang/calendar-en.js "></script> <!-- the following script defines the Calendar.setup helper function, which makes adding a calendar a matter of 1 or 2 lines of code. --> <script type="text/javascript" src="/calendar/calendar-setup.js "></script> <input type="text" name="newSchDate" id="newSchDate" readonly="1" value="<%= @params[:newSchDate] %>"/> <img src="/calendar/img.gif" id="f_trigger_c" style="cursor: pointer; border: 1px solid red;" title="Date selector" onmouseover="this.style.background=''red'';" onmouseout=" this.style.background=''''" /> <script type="text/javascript"> Calendar.setup({ inputField : "newSchDate", // id of the input field ifFormat : "%m-%d-%Y", // format of the input field button : "f_trigger_c", // trigger for the calendar (button ID) align : "Tl", // alignment (defaults to "Bl") singleClick : true }); </script> On 7/25/06, adam willson <willson.adam@gmail.com> wrote:> > woow wrote: > > I have been trying to get one of the calender javascripts to work with > > the <%= form.text_field. So when the user pick the date it updates the > > time fields? (like in normal reservation system where you pick up the > > date and time from the calender and when user pick the selection it > > updates the field) but I could not get this to work. > > > > Does anyone have got something similar to work? or could someone help me > > with this. > > > > thanks > > any help???? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060726/7e543dbc/attachment-0001.html
Stephen. Thank you so much....Is it possible for you to share the link to your website or how I can use this calender script? So I can take look at the code....and get it to work at my end? Thank you again Stephen wrote:> Hello, > > We use this calendar in our rails apps: > http://dynarch.com/mishoo/calendar.epl > >>From below is taken from our views. We end up parsing the results (in the > case its called newSchDate) manually into our Activerecord date... > > > <!-- calendar stylesheet --> > <link rel="stylesheet" type="text/css" media="all" > href="/calendar/calendar-win2k-1.css" title="blue" /> > > <!-- main calendar program --> > <script type="text/javascript" src="/calendar/calendar.js"></script> > > <!-- language for the calendar --> > <script type="text/javascript" src="/calendar/lang/calendar-en.js > "></script> > > <!-- the following script defines the Calendar.setup helper > function, > which makes > adding a calendar a matter of 1 or 2 lines of code. --> > <script type="text/javascript" src="/calendar/calendar-setup.js > "></script> > > > <input type="text" name="newSchDate" id="newSchDate" readonly="1" > value="<%= @params[:newSchDate] %>"/> > <img src="/calendar/img.gif" id="f_trigger_c" style="cursor: > pointer; > border: 1px solid red;" title="Date selector" > onmouseover="this.style.background=''red'';" onmouseout=" > this.style.background=''''" /> > > > <script type="text/javascript"> > Calendar.setup({ > inputField : "newSchDate", // id of the input > field > ifFormat : "%m-%d-%Y", // format of the input > field > button : "f_trigger_c", // trigger for the > calendar > (button ID) > align : "Tl", // alignment (defaults to > "Bl") > singleClick : true > }); > </script>-- Posted via http://www.ruby-forum.com/.
available as a Rails bundle here: http://blog.inquirylabs.com/2006/01/26/bundled-resource-v-09-full-dynarch-calendar-support/ -- Posted via http://www.ruby-forum.com/.
Fran?ois Montel wrote:> available as a Rails bundle here: > > http://blog.inquirylabs.com/2006/01/26/bundled-resource-v-09-full-dynarch-calendar-support/Thanks....and I am trying to include the fallowing in one of my already exsiting application and its kind of confusing how I could do this....is it possible for u to redirect or give me step be step instructions....I am new to ruby.. Thanks -- Posted via http://www.ruby-forum.com/.
You know, while I''ve downloaded it for future use in an application, I haven''t actually tried it, so I don''t know exactly how it works or what steps you would need to take to make it work for you. (I''m pretty new to Ruby myself.) On 7/26/06, woow <ruwanb@gmail.com> wrote:> > Fran?ois Montel wrote: > > available as a Rails bundle here: > > > > > http://blog.inquirylabs.com/2006/01/26/bundled-resource-v-09-full-dynarch-calendar-support/ > > Thanks....and I am trying to include the fallowing in one of my already > exsiting application and its kind of confusing how I could do this....is > it possible for u to redirect or give me step be step instructions....I > am new to ruby.. > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- "Impossible is nothing." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060726/95466210/attachment.html
woow wrote:> Fran?ois Montel wrote: >> available as a Rails bundle here: >> >> http://blog.inquirylabs.com/2006/01/26/bundled-resource-v-09-full-dynarch-calendar-support/ > > Thanks....and I am trying to include the fallowing in one of my already > exsiting application and its kind of confusing how I could do this....is > it possible for u to redirect or give me step be step instructions....I > am new to ruby.. > > Thanksa big hammer to kill a fly... I tried too but I found a much simpler, neat and useful solution at : http://www.frequency-decoder.com/demo/fd-date-picker/ 1- js and media folders to be moved into your public folder 2- insert 2 lines in your layout <head> <%= stylesheet_link_tag "scaffold", "fd_datepicker", :media => "all" %> <script type="text/javascript" src="../js/fd-datepicker.js"></script> 3- insert the tag in your form <label for="mydate">My Date</label><br /> <%text_field_tag(''mydate'', @mydate, {:class => "format-d-m-y", :readonly => "readonly", :maxlength => "25"} ) %> you can also modify the class according to the demo.... replacing "format-d-m-y" by @mydateclass and that''s it..... 1-2-3 ! kad -- Posted via http://www.ruby-forum.com/.
> and that''s it..... 1-2-3 !Concise & Impressive! Does it work transparently when saving/updating. text_field like ''27-07-2007'' have to be converted too suit the date type in the db ? Did it need some changes in the controller ? Thanks