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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:03:56+00:00 2026-05-26T15:03:56+00:00

How do I get the value of the field #id_start_date if the date is

  • 0

How do I get the value of the field #id_start_date if the date is populated already?

I tried this:

var sd = $("#id_start_date").val();
$("span.start_date").text(sd);

and also tried putting it inside a .change() or .click() but it didn’t work due to it being changed by the program and not manually.

edit

Here is the form section of my html.

....
<tr>
    <th>Start date</th>
    <td><input id="id_start_date" type="text" class="datepicker date_field" name="start_date" size="14" /></td>
</tr>
....

Any thoughts or suggestions?

Steve

  • 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-26T15:03:56+00:00Added an answer on May 26, 2026 at 3:03 pm

    I found out what my issue was and I figured I would post it here in case any others come across a similar issue.

    There was an AJAX call being made that had the start_date in it, so I placed the code inside the AJAX call and it worked.

    $.ajax({
            type: "POST",
            url: "{% url whatever %}",
            dataType: "json",
            data: q,
            success: function(json) {
                $("#id_maturity_date").val(json.maturity_date);
                var mat = $("#id_maturity_date").val();
                $("span.mat_date").text(mat);
    
                $("#id_start_date").val(json.start_date);
                var sd = $("#id_start_date").val();
                $("span.start_date").text(sd);
    
                $("#id_term_years").val(json.term_years);
                $("#id_term_months").val(json.term_months);
                ...
            }
        });
    

    For some reason, the .change() doesn’t fire when its being populated this way so I was never able to get the value unless I went inside the AJAX call.

    Thanks everyone for your input.

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

Sidebar

Related Questions

I've a field in the form,trying to get this value using jquery.It is always
Im trying to get a value from a text field (entered by the users)
I need to get the value of a field with a specific annotation, So
Can I get the value of an object field some other way than obj.field
I'm trying to get the value of a form field on submit using jQuery.
I have been trying to get a custom Value from the Custom Field that
Can get all triples with value null in specific field? All people with date_of_birth
I am trying to get the value of the text in the input fields.
I have a date stored within a text field with other text. Why didn't
Hi, I have a table that contains a foreign key value(id). This field is

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.