PiRSquared17 / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

There is no standard way to use it in subform #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create sub-form and add calendar_date_select_tag
2.
3.

What is the expected output? What do you see instead?
If I use <%= calendar_date_select_tag :posted_at
Should be <input id="comment_posted_at" name="comment[posted_at]" ...
But generates <input id="posted_at" name="posted_at" ...

If I use <%= calendar_date_select_tag :comment_posted_at
Should be <input id="comment_posted_at" name="comment[posted_at]" ...
But generates <input id="comment_posted_at" name="posted_at" ...

What version of the product are you using? On what operating system?
1.15

Please provide any additional information below.

Original issue reported on code.google.com by boris.mi...@gmail.com on 5 Dec 2009 at 3:59

GoogleCodeExporter commented 9 years ago
Just wanted to say "Huge Thanks" for the GEM - it saved me a lot of time!

Original comment by boris.mi...@gmail.com on 5 Dec 2009 at 4:01

GoogleCodeExporter commented 9 years ago
It would be great if you can update the CalendarDateSelect the way when it can 
be
used in Complex Forms (see 
http://railscasts.com/episodes/75-complex-forms-part-3)

My current work around the problem is:
1) In the form I use
 <%= calendar_date_select_tag :task_posted_at
2) In the project controller I use Date.parse(params[:task_posted_at]) to set 
the
value of posted_at attribute of newly created task

This method works with a limit of 1 new task per submit

P.S. I use v1.15 of the Gem

Original comment by boris.mi...@gmail.com on 5 Dec 2009 at 4:10