Sharepoint 2007 - set a datefield based on the content of another datefield?
Hi all - I am new here, and I use Jquery for MOSS 2007 work. I have been able to make some simple stuff work (hiding fields, hiding table elements, etc), but I have an issue that i would LOVE to be able to make work, and despite hours of searching, I can't figure it out. What I have is a form that is similar to a calendar, with descriptions, sales rep, etc, and two date fields. 'Rental Dates - Start' and 'Rental Dates - End'. What happens is that 'Rental Dates - Start' can be many months in the future, and the end date would always be AFTER the start date... when someone selects the start date, how can I make the "end" date default to that (to minimize the clicking necessary to set the end date).
What I tried is this (obviously after the jquery call):
<script>
$(document).ready(function(){
$(":input[title='Rental Dates - Start']").focusout(function ()
{
var NewDate = $(this).val();
)}.focustout();
$(":input[title='Rental Dates - End']").val(NewDate);
});
</script>
It obviously doesn't work (since I am posting here), but I can't figure out why not or how to make it work...
Any suggestions? Thanks!