http://keith-wood.name/datepick.html
但我能看到的唯一一件事是获取整个时间日月的警报
$(function() {
$('#popupDatepicker').datepick();
$('#inlineDatepicker').datepick({onSelect: showDate});
});
function showDate(date) {
alert('The date chosen is ' + date);
}我想知道怎样才能让他们分开
<input type="text" name="date" id="popupDatepicker"> When i select date here the fields in the hidden will change below
<input type="hidden" name="day">
<input type="hidden" name="month">
<input type="hidden" name="year">请指教
发布于 2012-05-20 19:14:53
日期选择器的onselect处理程序的问题是,使用日期选择器上的任何格式将日期作为字符串传递。
您可以使用$('#inlineDatepicker').datepicker('getDate')获取表示所选日期的实际Date对象。
您还可以使用$.datepicker.formatDate()将该对象转换为其他字符串格式,或者使用Date对象自己的方法来提取数值。
https://stackoverflow.com/questions/10672889
复制相似问题