【发布时间】:2012-10-18 11:46:39
【问题描述】:
这是 JS 小提琴:
$("#datepicker").datepicker({ dateFormat: 'dd/mm/yy', beforeShowDay: myFunction});
function myFunction(input, inst)
{
alert(inst);
}
根据文档:http://docs.jquery.com/UI/API/1.8/Datepicker#event-beforeShow
beforeshowDay 方法接受输入和 inst。虽然 inst 似乎总是未定义。这让我有些难过,因为我需要掌握日期选择器本身。
有解决办法吗?
【问题讨论】:
-
你在混淆
beforeShow和beforeShowDay吗?
标签: jquery jquery-ui datepicker