I got a button and a hidden input.
I want the datepicker opens below the button I click it. And the selected date is inserted in the hidden input.
I don't want to create a new button (using datepicker options), and I don't wanna show the input.
<button type="button" class="btn" id="date_button">Select Date...</button>
<input type="hidden" name="date" id="date_field" />
<script>
$('#date_button').datepicker({
showOn: "button",
onSelect: function( dateText ) {
$('#date_field').val( dateText );
$('#date_button').text( dateText );
}
})
</script>
Any ideas?