小编use*_*176的帖子

使用strtotime从jQueryUI datepicker将字符串转换为datetime

我正在使用jQueryUI datepicker,这是代码.

<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() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      numberOfMonths: 3,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      numberOfMonths: 3,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>

    <form action="{LINKTO_EXPORT}" method="post">
        <h1>{EXPORT_CSV}</h1>
        <label for="from">from</label>
        <input type="text" id="from" name="from">
        <label for="to">to</label>
        <input type="text" id="to" name="to">       
        <input …
Run Code Online (Sandbox Code Playgroud)

php jquery datetime jquery-ui datepicker

6
推荐指数
1
解决办法
511
查看次数

标签 统计

datepicker ×1

datetime ×1

jquery ×1

jquery-ui ×1

php ×1