# In place edit for date field

**URL:** <https://www.ruby-forum.com/t/in-place-edit-for-date-field/115446>\
**Category:** Rails\
**Created:** [September 25, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/in-place-edit-for-date-field/115446 "2007-09-25T12:11:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![basha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/41988e/32.png) [@basha](https://www.ruby-forum.com/u/basha)\
**Post date:** [September 25, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/in-place-edit-for-date-field/115446/1 "2007-09-25T12:11:48Z")

</div>

Hi

I am newbie for rails. I developed a single page with three fields.  
The fields are name, content and created\_on

I have installed the calendar\_date\_select plugin.

I am using in-place edit for all the fields.

If i change the name and content in-place editing , if i pressed ok,  
it stored into my database.

But I can’t able to store the date. How can i do that as in-place edit  
with calendar\_date\_select.

# The following code snippet for show.rhtml page

**Name:** \<%= in\_place\_editor\_field :page, :name %\>   
**Content:** \<%= in\_place\_editor\_field :page, :content %\>   
**Created\_on:** \<%= calendar\_date\_select :page, :created\_on %\>

# \<%= link\_to ‘Back’, :action =\> ‘list’ %\>

Please anyone help me to solve this problem. is there any help pages  
and manual guide for in-place edit for date.

Thanks in advance

- Basha.S

---

<div class="post-metadata">

**Author:** ![basha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/41988e/32.png) [@basha](https://www.ruby-forum.com/u/basha)\
**Post date:** [September 25, 2007, 12:42pm UTC](https://www.ruby-forum.com/t/in-place-edit-for-date-field/115446/2 "2007-09-25T12:42:50Z")

</div>

Hi Basha,

> The fields are name, content and created\_on

You need to pick a different name for the created\_on field. See  
[http://wiki.rubyonrails.org/rails/pages/MagicFieldNames](http://wiki.rubyonrails.org/rails/pages/MagicFieldNames) for more on why.

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![basha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/41988e/32.png) [@basha](https://www.ruby-forum.com/u/basha)\
**Post date:** [September 25, 2007, 1:14pm UTC](https://www.ruby-forum.com/t/in-place-edit-for-date-field/115446/3 "2007-09-25T13:14:01Z")

</div>

Hi,

I changed created\_on field to createdon.

\<%= calendar\_date\_select :page, :createdon %\>

I can change the date using that datepicker control, it displayed in  
textfield.

But it does not to my database. I just refresh the page , It always  
show the previous date value.

I tried like this also \<%= in\_place\_editor\_field :page, :createdon, \<  
%= calender\_date\_select :page, :createdon %\>

I guess i am wrong, is that anything i am missing?

- Basha.S
