tags:

views:

108

answers:

1

I know how to copy an input field to something else. No prob. How do I copy part (ie. the month of a date field) to another field.

I want to take a field that is a date range (ie. 7-13-09 to 7-15-09) and copy it to two input fields (ie. the start date and end date)

+2  A: 
$("#startDate, #endDate").each( function( i ) {
    $(this).val( $("#dateRange").val().split(" to ")[ i ] )
})
Jed Schmidt
I'm a little unclear about this. How do I split "06/12/2008,06/19/2008" to two input fields?
Kevin Brown
Whao! Sorry, I got it! jQuery is really new to me. Sorry, I just skimmed... :)
Kevin Brown