我一直在使用位于此处的datepicker插件 - http://www.malot.fr/bootstrap-datetimepicker/并且实际的日期选择器正常工作,它会在视觉上将日期添加到框中。
但是提交表单时,两个变量(“from”日期和“to”日期)不会作为POST变量传递。谁能帮助我看看我哪里出错?
let viewSize = targetView.bounds.size
let rect = CGRect(x: 20, y: 20, width: viewSize.width - 20*2, height: viewSize.height - 20*2)
// Cuts rectangle inside view, leaving 20pt borders around
targetView.mask(withRect: rect, inverse: true)
// Cuts 20pt borders around the view, keeping part inside rect intact
targetView.mask(withRect: rect)
答案 0 :(得分:1)
为输入dtp_input1 / dtp_input2提供名称属性?
<input type="hidden" id="dtp_input1" value="" name="from" />
<input type="hidden" id="dtp_input2" value="" name="to" />
$_POST['from']
$_POST['to']
这有帮助吗?