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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:13:26+00:00 2026-06-10T05:13:26+00:00

Here i have From Date and To Date with submit button. And i’m using

  • 0

Here i have “From Date” and “To Date” with submit button. And i’m using telerik radate control for this project. So, I couldn’t add that telerik control.

Here Everything is fine for my requirement and one enhancement is there.

http://jsfiddle.net/ssthil/4tyJ4/

Additional Info :
The “From Date” will not be earlier than 13 months back compare with “To Date”.

How to add the validation for this? looking for your help.

  • 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-10T05:13:27+00:00Added an answer on June 10, 2026 at 5:13 am

    You can set the month to a date in the past and compare with that:

    var today = new Date(), // you can use only one Date, this is only for clarity
        back = new Date();
    back.setMonth( today.getMonth() - 13);
    return fromDate > back;
    

    Fixing the day as suggested by @mplungjan:

    var months = 13;
    if (back.getMonth() == (today.getMonth() - months % 12 + 12 + 1) % 12)
       back.setDate(-1);
    

    Updated fiddle: Use a clone of endDate instead of today to init back, then compare with startDate:

    var back = new Date(endDate);
    …
    return startDate > back;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script for dynamic javascript date picker, taken from here . Please
I have this code here printf '$request1 = select * from whatever where this
Basically I'm using datepicker from jQuery to have my client pick a date. I
I have a code here to generate an excel file if the submit button
Here you have my switch from my Class Essaie with the Main() : switch(c)
Here's the code I have: from cStringIO import StringIO from lxml import etree xml
From here I have seen it suggested that an instance of RichTextBox be created
Here I have a simple php script which displays some values from a database
I have here a bubble popping game where bubbles fall from top of the
i have developed application for read information from card reader. Here i have used

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.