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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:56:54+00:00 2026-06-12T08:56:54+00:00

I am working on some project based on Twitter Bootstrap which using a datepicker

  • 0

I am working on some project based on Twitter Bootstrap which using a datepicker from https://github.com/eternicode/bootstrap-datepicker (that is a fork from some other version), but it’s missing a very important feature that I need – how to enable only specific date range (eg. from past 15 days till today), so any other date can’t be even selected (not clickable).

I found a similar solution here on SO, which disables Saturdays and Sundays:
Limit bootstrap-datepicker to weekdays only?
http://jsfiddle.net/katowulf/zNbUT/5/ , but I dont know how to adjust it to my needs.

Thanks in advance.

  • 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-12T08:56:55+00:00Added an answer on June 12, 2026 at 8:56 am

    The similar question you linked to ended up using quite a hack, but what you want is a lot simpler — you’re looking for the startDate and endDate options:

    $('#dp1').datepicker({
        format: 'mm-dd-yyyy',
        startDate: '-15d',
        endDate: '+0d' // there's no convenient "right now" notation yet
    });
    

    These options can take Date objects, timedelta strings (as I did here), or date strings following the given format.

    Demo: http://jsfiddle.net/zNbUT/131/

    Also, make sure you’re using the code from github — eyecon.ro’s copy is the original code, with old bugs and without the newer features.

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

Sidebar

Related Questions

I'm currently working on a Haskell project which automatically tests some functions based on
I am working on a personnel asp.Net project that has some calender based events.
I´m working on a project that basically will show some data collected from hardware
I'm working on a university project which is based in cloudsim3.0 project. I'm using
I am working on some project that needs that when ever a friend of
I'm working on a project involving some large XML files (from 50MB to over
A project I'm working on is suffering from some minor performance issues. Our team
I'm working with a test project based on WhoCanHelpMe, which is based on Sharp
I'm working on a project(PHP Based) in which I need to compute SHA1, I'm
I'm working on a project that calls a console window to process some data

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.