我找不到如何设置 $_GET 变量来手动设置日期选择器中的日期。 http://jqueryui.com/demos/datepicker/
(示例:http://www.something.com/?day=21&month=2&year=2010)
这可能吗?
谢谢
最佳答案
在这个link中使用gup函数读取获取参数。然后调用setDate方法(错误处理省略):
$(function() {
$("#Datepicker").datepicker();
var year = gup("year");
var day = gup("day");
var month = gup("month");
$("#Datepicker").datepicker("setDate", month + "/" + day + "/" + year);
});
关于php - Jquery UI : date picker. 如何通过 $_GET 在日期选择器中设置日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2874344/