Ajax sends data but php doesn't recieve it
<p>I am using <strong><code>ajax</code></strong> to send data to a php function. The end goal is to display rows of data based on <strong><code>$tweetdate</code></strong>. Here is my ajax script:</p>

<pre><code>jQuery('#bootstrapModalFullCalendar').fullCalendar({
    dayClick:  function(date, event, jsEvent, view) {
            var date = date.format();
        jQuery.ajax({
            type: "POST",
            url: ajaxurl,
            data: {
                'action': 'show_scheduled_tweets',
                'tweetdate': date
            },
            beforeSend: function() {
                console.log('before')
            },
            success: function(){
                console.log('success')
            },
            error: function(){
                console.log('error')
            },
        });
    }
});
</code></pre>

<p>Here is my php function (add_action is for WordPress usage):</p>

<pre><code>&lt;?php
    add_action('wp_ajax_show_scheduled_tweets', 'show_scheduled_tweets');
    function show_scheduled_tweets () {
        global $wpdb;
        $tweetdate = $_POST["tweetdate"];
        $query = "SELECT * FROM wp_tweettweet WHERE tweetdate='$tweetdate'";
        $results = $wpdb-&gt;get_results($query, ARRAY_A);

        foreach($results as $result) {
            $tweet2 =  $result[text];
            $recycleOption = $result[recycle];
            $id = $result[id];

            $currentDateTime = $result[time];
            $time = date('h:i A', strtotime($currentDateTime));


        ?&gt;

            &lt;form class="tweetclass form-inline" action="" method="post"&gt;
                &lt;input type="checkbox" name="recycle" &lt;?php if($recycleOption == 1){ echo "checked";} ?&gt;&gt;Recycle Tweet?
                &lt;input class="tweetinput" type="text" name="tweetupdate" value="&lt;?php echo $tweet2; ?&gt;"&gt;
                &lt;input type="hidden" name="id" value="&lt;?php echo $id; ?&gt;"&gt;
                &lt;input type="text" name="timepicker" class="timepicker" value="&lt;?php echo $time; ?&gt;"/&gt;
                &lt;input class="tweetsubmit" type="submit" value="Save"&gt;
                &lt;input class="tweetdelete" type="submit" value="delete"&gt;
            &lt;/form&gt;
        &lt;?php
        }
    }
    show_scheduled_tweets();
?&gt;
</code></pre>

<p><strong><code>fullCalendar</code></strong> is a <strong><code>jQuery</code></strong> event calendar. When the user clicks on a day (dayClick) that day is saved to date. That date is what I am trying to save to "tweetdate" in my ajax. </p>

<p>In chrome, when I use the network tab on the inspector I can see the ajax result and the date clicked on is set to "tweetdate". That isn't getting picked up by my php function. In my php <strong>"tweetdate"</strong> is not getting a value assigned to it. </p>

<p>Now, if I go into my php function and set "tweetdate" to an actual date instead of <strong><code>$_POST["tweetdate"];</code></strong> e.g. 2016-06-15 than everything works perfectly. </p>

<p>I'm not quite sure what is going on.</p>