Reputation: 17
I am trying to integrate the jQuery datepicker calendar into my page. I don't want the user to have to click on the date field for the calendar to appear, I want them to be able to see the calendar as soon as the page loads. Is this doable, and if so, how?
I have been looking on StackOverflow for help but I'm not sure whether what I'm searching for is the correct way of describing it.
Thanks very much.
Upvotes: 0
Views: 66
Reputation: 3514
As described in the documentation at jqueryui.com, you might simply call the .datepicker()
method on a div instead of an input field to display the datepicker inline.
The only problem arousing of this usecase is the fasct, that you won't get the date directly inserted in an input field. You can retrieve the value by calling $("#yourDatepickerDiv").datepicker( 'getDate' );
Upvotes: 1