The popup calendar now works for updating actions too. Just click in the date field to pop the calendar up.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@87 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2005-05-28 14:33:39 +00:00
parent 8406a482d5
commit 6cd9335de8

View file

@ -44,13 +44,15 @@
</tr>
<tr>
<td class="label"><label for="item_due">Due</td>
<td><input name="item[due]" id="item_due" value="<%= format_date(@item.due) %>" size="10" tabindex="5" /></td>
<td><input name="item[due]" id="due_<%= @item.id %>" type="text" value="<%= format_date(@item.due) %>" tabindex="5" size="10" onFocus="Calendar.setup" /></td>
</tr>
<tr>
<td><input type="submit" value="Update" tabindex="6" />
<a href="javascript:void(0);" onclick="Element.toggle('item-<%= @item.id %>','action-<%= @item.id %>-edit-form');Form.reset('form-action-<%= @item.id %>');">Cancel</a></td>
</tr>
</table>
<script type="text/javascript">
Calendar.setup({ ifFormat:"<%= ApplicationController::DATE_FORMAT %>",firstDay:<%= ApplicationController::WEEK_STARTS_ON %>,showOthers:true,range:[2004, 2010],step:1,inputField:"due_<%= @item.id %>",cache:true,align:"TR" })
</script>
<% @item = nil %>