JQuery Mobile Datebox onload popup

error77 used Ask the Experts™
Hi all,

I am using JQuery Mobile Datebox plugin.

More details here: http://dev.jtsage.com/jQM-DateBox/

You can popup the calendar by clicking on the button ... what I need to do is open the popup on page load instead.

Is this possible please?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

if the plugin you're using doesn't provide an option to open it programmatically, you could try to trigger an click-event on the button on page-load

  var button = $(<button-selector>);
You can do the following, assuming you have ONE (and only one) datebox per page:

$('body').ready(function() { self.open(); });

Open in new window

Insert that at line 458, just after

		if ( input.is(':disabled') ) {

Open in new window

Forgot to put on there that the file is jquery.mobile.datebox.js that you need to edit.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial