我正在使用jQuery DateDange Picker,但找不到会给我带来所选日期范围的事件。
这是我的约会选择器看起来像https://snag.gy/sqiopk.jpg
html
<div id="example-advanced-daterangepicker" data-step="1" data-intro="This is a date range selector!">
<i class="fa fa-calendar"></i>
<span>April 6, 17 - April 6, 17</span>
<b class="caret"></b>
</div>
我已经在此URL中查找您的解决方案。
我在那里发现了一些可用于提供选定日期范围的活动。
getValue (Function)
您可以在日期范围选择器触发的事件中调用此功能。喜欢,
.bind('datepicker-change',function(event,obj)
{
// It will fire while selecting date range from the picker. SO you can set your code here something to get selected date range
console.log(obj); // By using this object you will sure find some solution to get a range between two dates.
date1: (Date object of the earlier date)
date2: (Date object of the later date),
}
要获得更多帮助,您可以检查此URL。这对您有帮助。谢谢。