Placing value in text field using datepicker and sending to function
<p>How can I keep the value of the datepicker in the text area while using a function?</p>

<p>ex:</p>

<pre><code>if($currentSelectionClass == "rowStartDate"){
    $('&lt;input id="selectDateStart" type="text" /&gt;')
        .attr('name', 'editStartDate')
        .addClass('editStartDate')
        .appendTo(this)
        .datepicker({onSelect: startDateSubmit()});
    }
</code></pre>

<p>AND how would I send the datepicker value to my function?</p>

<p>Function code:</p>

<pre><code>function startDateSubmit(){
            $selectDateStart = $('#selectDateStart').val();
            $.ajax({ 
                url: '/ajax/training-update.php',
                data: {action: $selectDateStart},
                type: 'POST',
                success: function(output) {
                    alert(output);
                    }
            });
        }
</code></pre>
