【发布时间】:2013-10-25 03:52:42
【问题描述】:
我正在使用 jquery datepicker。它正在单击一个按钮,但仅在 mozilla firefox 中,但不在 google chrome 中,也不在 IE 中。请告诉我该怎么做,以便 datepicker 可以在所有浏览器中工作。请jsfiddle
HTML
<input type="button" id="selectdate" value="">
<textarea name="dates" id="dates" maxlength="160" placeholder="your message" rows="4" cols="50"></textarea>
JQUERY
$( "#selectdate" ).datepicker({
altField: $('#dates').val(),
numberOfMonths:1,
altFormat: "yy-mm-dd",
minDate: -0,
onSelect: function( selectedDate ) {
$("#selectdate").val('');
$('#dates').val($('#dates').val()+','+selectedDate);
}
});
【问题讨论】:
-
你在不同版本的IE和goolge chrome上试过了吗?
-
你的小提琴在 chrome 中为我工作(版本 30.0.1599.101)...
-
@Nikhil 我正在使用 oracle linux,我使用的 google 版本显示为最新。
-
@Nikhil 如果客户端是 jaquery datepicker 不支持的某个版本,是否可以发出警报
-
@PragneshChauhan 是的,它在谷歌浏览器中的更高版本中工作。我使用的是 oracle linux,26 是最新版本。所以它不起作用。如果有的话,可以向客户发出警报如果使用较低版本,则 jquery 的一部分(如 datepicker)将不起作用
标签: javascript jquery html css datepicker