开发者

Simple jQuery UI DatePicker question

Maybe I'm asking a really stupid question here but how do I update an input field with a date if the datepicker is attached to a div. Don't want to use the altField function as I want to use this to display 开发者_运维知识库a user friendly output to the site user.

Thanks


You can use altField for hidden input and bind to this hidden change event to do something else (aka. show user friendly output).

$('.selector').datepicker({ altField: '#actualDate' });
$('#actualDate').change(function(){ ... });

Or use events.

$('.selector').datepicker({
   onSelect: function(dateText, inst) { ... }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜