jquery - Bootstrap DateTimePicker set minimum time -


i have bootstrap datetimepicker. it's current minimum time whatever time in real time. need minimum time real time plus 20 minutes added. if 2:30pm need minimum time allowed 2:50pm in datetimepicker. how can this?

<div class="calender">                             <div class='input-group date' id='datetimepicker1'>     <input type='text' class="form-control" />     <span class="input-group-addon">       <span class="glyphicon glyphicon-calendar"></span>     </span>   </div>    @section scripts {     <script>       $("#datetimepicker1").datetimepicker({         mindate: new date()                                             });     </script>   }                            </div> 

in effect you're asking 'how can add 20 minutes current date?' can use setminutes(), this:

var mindate = new date(); mindate.setminutes(mindate.getminutes() + 20);  $("#datetimepicker1").datetimepicker({     mindate: mindate                                 }); 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -