Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:14:30+00:00 2026-05-23T03:14:30+00:00

I am using JQuery Mobile Datebox as I am having the following problem. I

  • 0

I am using JQuery Mobile Datebox as I am having the following problem.

I have page A and page B.

If I go to page B and open the date picker called “date2”, then close it and click the Home page link, which goes to page A.

Now, I’m in page a and I hit the button to open up date picker A, called “date” …

The problem is that I’m getting both opening … it’s like they are both opened or something.

How can I kill the instance of the date pickers once closed please?

Here’s the relevant code for page A:

In the head:

<script type="text/javascript">
        $( document ).bind( "mobileinit", function(){
            $.mobile.page.prototype.options.degradeInputs.date = 'text';
        }); 
    </script>

Then the form / date picker 1:

<form action="#" method="POST">
        <div data-role="fieldcontain" style="visibility:hidden;">
          <input value="" name="date" type="date" data-role="datebox" id="date" data-theme="a" data-options='{"mode": "calbox", "pickPageTheme": "a", "pickPageHighButtonTheme": "e", "setDateButtonLabel": "Calendar", "useDialogForceTrue": false, "useDialogForceFalse": true }'/>   


          </div>
          </form>

Now the relevant code for page B

in the page head:

<script type="text/javascript">
        $( document ).bind( "mobileinit", function(){
            $.mobile.page.prototype.options.degradeInputs.date = 'text';
        }); 
    </script>

<script language="javascript">
    $(document).ready(function() {

       var queryDate = $.url.param("mydate");
       $('#date2').val(queryDate);


    });

</script>

And the form part:

<form action="save.php" method="POST">

          <label for="date2" style="margin:10px 0px;">Event Date:</label>
          <input value="1/1/2011" name="date2" type="date" data-role="datebox" id="date2" data-theme="a" data-options='{"pickPageTheme": "a", "pickPageHighButtonTheme": "e", "setDateButtonLabel": "Add Date", "dateFormat": "dd/mm/YYYY"}'/>  

          <label for="textarea">Add:</label>
                <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
                <input type="submit" value="Save" data-theme="a" />


          </form>

Anyone has any clues please?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:14:31+00:00Added an answer on May 23, 2026 at 3:14 am

    If you’re using jquery mobile do not use document.ready() for jqm. it will not work. use something like this instead.
    check out the jqm demo for the full list of events. Demo

     $(document).live('pageshow',function() {
    
           var queryDate = $.url.param("mydate");
           $('#date2').val(queryDate);
    
    
        });
    

    Also all js should be in the first html that is loaded. in your case it’s page A.
    Simply because the subsequent page is loaded via ajax and js that is written inside will not be executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using JQuery mobile in asp.net web form website. I have the following
I'm using JQuery-Mobile. On specific child page loads, I want to perform one JavaScript
I am currently developing a mobile site using jQuery mobile. I have one simple
I am developing the application using jQuery Mobile 4.1. In my app, I have
I'm using jQuery Mobile on an MVC 3 website. Working well except that I
I'm using JQuery Mobile UI and the widgit kit is nice. However I'm also
I'm using jQuery Validate with jQuery Mobile for a mobile application. I've been trying
How to disable the button in coding using jquery mobile? <div data-role=button id=val>Value</div> [Note
I'm trying to create a mobile version of my views using jQuery Mobile, but
I'm trying to display a list of labels and inputs using JQuery Mobile so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.