我使用XDSoft的jQuery Datetimepicker插件:http://xdsoft.net/jqplugins/datetimepicker/
我将日历显示为内联.这是我的代码:
HTML:
<input type="text" id="start_date">
Run Code Online (Sandbox Code Playgroud)
JS:
jQuery('#start_date').datetimepicker({
format:'d.m.Y H:i',
inline:true
});
Run Code Online (Sandbox Code Playgroud)
我的问题:当我在前端选择一个日期时,输入字段不会将所选日期作为值.我需要做出哪些更改或需要添加什么?
我正在使用ajax从我的数据库中获取事件.检索结果不起作用,不显示任何内容,并在控制台中收到以下错误消息:
POST http://www.example.com/system/live_filter.php 500(内部服务器错误)jquery.min.js:4
这是我的HTML/JS:
<div id="results">
<script type="text/javascript">
// 1. When user comes on page from homepage, results will be fetched with ajax
function updateResults() {
// 2. Create array with values of all filter fields
var value_town_id = $('#town_id').val();
var value_type = $('#filter_type').val();
var value_date = $('#filter_date').val();
var array_filter_values = new Array(value_town_id, value_type, value_date);
array_filter_values.join(', ');
query_value = array_filter_values;
// 3. Start ajax
$.ajax({
type: "POST",
url: "system/live_filter.php",
data: { query: query_value },
cache: false,
success: …Run Code Online (Sandbox Code Playgroud) 我创建了一个按钮:
http://jsfiddle.net/fy2zG/#&togetherjs=xaJ1VA8PBN
我的css到目前为止是:
.button {
padding: 5px 20px;
background: orange;
position: relative;
float:left;
text-align: center;
border-radius: 10px;
text-decoration: none;
color: white;
}
Run Code Online (Sandbox Code Playgroud)
我的目标是让(仅)按钮的右侧在悬停时转向箭头峰值.结果应该是类似的东西:

悬停时,按钮应转换为其原始形状.
这可以用CSS实现还是需要jQuery?