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

  • Home
  • SEARCH
  • 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 9021439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:15:21+00:00 2026-06-16T05:15:21+00:00

after searching for a bit I decided to ask this question. I have a

  • 0

after searching for a bit I decided to ask this question.

I have a jquery datepicker that is in a form, and after changing the date and clicking submit the url will look like this: index.php?thedate=12%2F22%2F2012# which is really 12/22/2012. I then need it to extract the url and change the selected date to whatever is in the url. So for my early example of 12/22/2012, the selected date on the calendar would be the 22nd.

Here’s my code:

<form method='get' action='#'>

    <div id="datepicker"></div>
    <input type='hidden' id='thedate' name='thedate' />

    <input type='submit' value='SUBMIT' id='submit'/>

</form>

and my javascript:

$( "#datepicker" ).datepicker({
    minDate: 0,
    onSelect: function(dateText, inst) { 
        alert(dateText);
        document.getElementById('thedate').value=dateText;
    }
});

Thanks for any and all help! If you need any more details or specifics, please just ask!

  • 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-06-16T05:15:22+00:00Added an answer on June 16, 2026 at 5:15 am

    You have to set the date format. Do this:

    $( "#datepicker" ).datepicker( "option", "dateFormat", 'mm/dd/yy' );

    You also can specify 2 date formats. One for presentation purposes dateformat and another one the real date to use in you application. This last one is the altformat and must be togehter with the altfield, this field is a field that stores the picked date in its alternate format.

    $("#datepicker").datepicker({ 
      dateFormat: "mm/dd/yy",
      altFormat: "mmddyy",
      altField: "#alt-date"
    });
    
    <input type="hidden" id="alt-date"/>
    

    Therefore you can use this altField (usually a hiddenField) to store date and send it to the server.

    TEST IT

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

Sidebar

Related Questions

UPDATE: After searching a bit I don't seem to be alone about this problem:
After extensive searching on this matter, I have been unable to find an answer
I have received this error after updating to Windows 7 64-bit and then running
After searching a bit on the net it seems that I can't map Ctrl
After a bit of searching, I've found that it's possible to instantiate a WTForms
After google searching, searching this site as well as jQuery found there was no
So after a bit of searching for Win32 GUI tutorials (I decided a tutorial
I am a little bit new to ASP.NET MVC, after searching I still have
After searching quite a bit in the Internet for a solution I decided to
after a bit of searching I was unable to find a helpful post 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.