JSFiddle - React, Tailwind, and code Playground

by hongyang1033

HTML

<!doctype html>
<html lang="en">

  <head>
    <meta charset="utf-8">
    <title>jQuery UI Datepicker - Default functionality</title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <script>
      $(function() {
        $("#datepicker").datepicker();
      });

    </script>
  </head>

  <body>

    <p>Date:
      <input type="text" id="datepicker">
    </p>
    <p>Subject:
      <input type="text" id="subject">
    </p>
    <p>Start Time:
      <select id="startTime">
        <?php
$hour = 0;
while($hour++ < 24)
{
    $timetoprint = date('G:i',mktime($hour,0,0,1,1,2011));
    echo "<option value=".$timetoprint.">".$timetoprint."</option>";
}
?>
      </select>
    </p>

    <p>End Time:
      <select id="endTime">
        <?php
$hour = 0;
while($hour++ < 24)
{
    $timetoprint = date('G:i',mktime($hour,0,0,1,1,2011));
    echo "<option value=".$timetoprint.">".$timetoprint."</option>";
}
?>
      </select>
    </p>
    <button type="button" id="generate">Generate</button>


    <div id="qrCode">
    </div>


  </body>

</html>

JavaScript

$('#generate').click(function() {
  var $target = $(this).closest("body");
  var $subject = $target.find('#subject').val();
  var $date = $target.find('#datepicker').val();
  var $startTime = $target.find('#startTime').val();
  // var $sip= document.getElementById("subject").val();
  alert($subject);
  alert($date);
  alert ($startTime);
  var $string = $subject + '.' + $date;
  alert ($string);

});
/* 
  $("#submit").click(function() {
   var myDate = new Date();
    var displayDate = (myDate.getMonth()+1) + '/' + (myDate.getDate()) + '/' + myDate.getFullYear() + ' ' + myDate.getHours() + ':' + myDate.getMinutes();
    
    var $row = $(this).closest("tbody");
    // Find the tbody
    var $partition= $row.find("#partition").text();
    var $sip = $row.find("#sip").text();
    var $define = $row.find('#define').text();
    var $usercomment = $row.find("#usercomment").val();
    var $emulation = $row.find('#emulation').is(":checked");
    var $simulation = $row.find('#simulation').is(":checked");
    var $synthesis = $row.find('#synthesis').is(":checked");    
    var $unixpath = document.getElementById("#unixpath").htmlFor;
    var $sambapath = $row.find('#sambapath').val();
    var $user = $row.find('#user').text();
    var $reviewer = $row.find('#reviewer').text();
    $row.find("#commentArea5903,#emulation,#simulation,#submit").prop('disabled', true);    
    

   // console.log($row);
   alert ($sambapath);
    alert($unixpath);
    //alert (displayDate);
    
});
*/