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) { ... }
});
精彩评论