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 7910647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:56:34+00:00 2026-06-03T12:56:34+00:00

i have a script for a datepicker and it puts the date selected to

  • 0

i have a script for a datepicker and it puts the date selected to my input text:

<script type="text/javascript" language="javascript">
$(function () {
    $(".datepicker").datepicker({ onSelect: function (dateText, inst) { },
        altField: ".alternate"
    });

});

this is my form:

<form action="/" >

   <input type="text" class="alternate" onchange='this.form.submit()' readonly="readonly" />

</form> 

i would like to automatically submit the form everytime the value of input text changes.. everytime i select a new date in the datepicker, the input text changes, but the form does not submit… how could i do this?

  • 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-03T12:56:35+00:00Added an answer on June 3, 2026 at 12:56 pm

    See Call Javascript onchange event by programatically changing textbox value

    Why not just use the onSelect event from the datepicker to submit the form?

    Something like:

    $(function () {
        $(".datepicker").datepicker({ onSelect: function (dateText, inst) { 
               $("#textboxID").val(dateText);
               $("FORM").submit();
            },
            altField: ".alternate"
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue in making datepicker regional. <script type=text/javascript> $(document).ready(function () { $(function
I have this: <script> $(function() { $( #datepicker ).datepicker({ dateFormat : yy-mm-dd, onSelect: function(dateText)
I have: <script> $(function() { $( #datepicker ).datepicker(); }); </script> <div class=demo> <p>Date: <input
<script type=text/javascript> $(function() { $('#dp_date').datepicker({ dateFormat: 'm/d/yy', minDate: 1, beforeShowDay: $.datepicker.noWeekends }); }); </script>
<script type=text/javascript> $(function () { $('.datePicker').datetimepicker({ dateFormat: 'dd/mm/yy' }); }); </script> </asp:Content> <asp:Content ID=Content2
if i put this code to show jquery datepicker : <script type=text/javascript> $(function ()
I have a date picker: <link rel=stylesheet type=text/css href=/css/jquery-ui-1.8.17.custom.css/> <script src=/js/jquery-1.7.1.min.js></script> <script src=/js/jquery-ui-1.8.17.min.js></script> <div
i have a script in my view which is: $('.datepicker').datepicker ( { onSelect: function
this is my Script part in Master page : <script src=../../Scripts/jquery-1.7.1.min.js type=text/javascript></script> <script src=../../Scripts/jquery.ui.datepicker.js
I have a script for dynamic javascript date picker, taken from here . Please

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.