从日历中选择多个日期

时间:2017-12-28 06:21:33

标签: java android

我想从日历中选择多个日期,并希望在textview中显示。这种库在FS日历中可用,但仅适用于ios。任何人都可以帮忙吗?

image

1 个答案:

答案 0 :(得分:0)

<html>
<head>
<title>Azania Tutorials </title>
<meta charst="utf-8">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>

<!-- Isolated Version of Bootstrap, not needed if your site already uses Bootstrap -->
<link rel="stylesheet" href="https://formden.com/static/cdn/bootstrap-iso.css" />

<!-- Bootstrap Date-Picker Plugin -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>



<script type="text/javascript">

$(document).ready(function(){
      var date_input=$('input[name="myrosterdate"]'); //our date input has the name "myrosterdate"
 var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
      var options={
      multidate:true,
      format: 'yyyy-mm-dd',
        container: container,
        todayHighlight: true,
        autoclose: false,
      };
      date_input.datepicker(options);
    })
</script>
</head>
<body>
<div class="bootstrap-iso">
 <div class="container-fluid">
  <div class="row">
   <div class="col-md-6 col-sm-6 col-xs-12">

    <!-- Form code begins -->
    <form method="post">
      <div class="form-group"> <!-- Date input -->
        <label class="control-label" for="date">Date</label>
        <input class="form-control" id="myrosterdate" name="myrosterdate" placeholder="MM/DD/YYY" type="text"/>
      </div>
      <div class="form-group"> <!-- Submit button -->
        <button class="btn btn-primary " name="submit" type="submit">Submit</button>
      </div>
     </form>
     <!-- Form code ends --> 

    </div>
  </div>    
 </div>
</div>

</body>
</html>