[英]how to get start and end on date and time range picker?
I can't see how to get the start and end from a date and time range picker I usually use data-link-field="dtp_input1"
to get the data to insert into a table like I code it like this: 我看不到如何从日期和时间范围选择器中获取开始和结束位置,我通常使用data-link-field="dtp_input1"
将数据插入到表中,就像我这样编码:
<input type="hidden" id="dtp_input1" name="date" value="" /><br/>
Now my code from date and time range picker is like this: 现在我的日期和时间范围选择器中的代码是这样的:
<div class="form-group">
<label>Date and time range:</label>
<div class="input-group">
<div class="input-group-addon"> <i class="fa fa-clock-o"></i>
</div>
<input type="text" class="form-control pull-right" id="reservationtime">
</div>
<!-- /.input group -->
</div>
<!-- /.form group -->
and for the javascript: 对于javascript:
$('#reservationtime').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
format: 'MM/DD/YYYY h:mm A'
});
please see my screenschot 请看我的screenschot
how can i code to get start and end and enter it on mysql database 我该如何编码以开始和结束并在mysql数据库上输入它
$('#reservationtime').daterangepicker({
timePicker: true, timePickerIncrement: 30,
format: 'MM/DD/YYYY h:mm A'
}).bind('datepicker-change',function(event, obj)
/* This event will be triggered when second date is selected */
console.log('change',obj);
// obj will be something like this:
// {
// date1: (Date object of the earlier date),
// date2: (Date object of the later date),
// value: "2013-06-05 to 2013-06-07"
// }
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.