我希望datepicker选择currentdate/today并显示它而不是'dd-yyyy',而且我希望今天之前的日期不能选择,请帮帮我!在jquery中使用日期选择器,今天显示
$(document).ready(function() {
$("#button_id").click(function() {
$('<div/>', {
id: "div_id"
}).append($('<input>', {
type: "date",
name: "someDate",
class: "date_id"
})).appendTo("#static_div");
$(".date_id").datepicker({
//i want the datepicker to select the currentdate/today and display it instead of'dd----yyyy'and moreover i wanted the date before today to be disabled from selection
});
});
});
这里的链接到我的小提琴:
http://jsfiddle.net/L4reds/73pEN/1/
你不能有相同的ID不止一个对象,使用而不是css类。 :) –
你想让它选择一天,同时给你一个选择?我不理解你的问题。 – RRikesh