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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:07:07+00:00 2026-05-18T08:07:07+00:00

I have 2 date fields (from_date, to_date) in django admin site for a model.

  • 0

I have 2 date fields (from_date, to_date) in django admin site for a model. Whenever the value of ‘from_date’ changed, I need to add from_date + 10 more days to the to_date field. I have used change() event of the from_date text box. The problem is that When I choose the date from Date Widget, this change() is not getting called. Any suggestions to deduct this change?

  • 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-18T08:07:08+00:00Added an answer on May 18, 2026 at 8:07 am

    The reason the change event is not fired is because the value is changed programmatically instead of by the user, after which the input field recieves focus. Upon losing focus, the input field detects no changes, as the value is not changed during the time the widget was focussed.

    I would suggest using the onBlur() event listener of the TextInput to change the to_date field, which is fired as soon as a input widget loses focus:

    $('.dateinput').blur(function() {
        // Calculate to_date here
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Oracle database and one of the fields is a date range
Specifically, I have a model that has a field like this pub_date = models.DateField(date
I'm developing a Django application that contains a model with a date/time field. On
If you have a date time field within the admin, and you invoke the
I have a record set that includes a date field, and want to determine
I have an UPDATE sql command that modifies a Date/Time field in a particular
I have a date variable as 24-dec-08 . I want only the 08 component
I have a date and time column in my mysql table called start_date and
For PHP I have a date I want line wrapped. I have $date =
If I have a date, how do I calculate the week number for that

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.