?
Solved

jquery date picker - limit the date selection

Posted on 2013-01-10
3
Medium Priority
?
377 Views
Last Modified: 2013-01-25
Can anyone please let me know how to disable the previous dates from the current date and the next dates after the 6months (from the current date) in date picker.  I need to allow the user to select only the dates from current date and next 6 months dates, rest all dates should be disables and non select able.
0
Comment
Question by:Gangadhara Melukote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 1600 total points
ID: 38765795
Test page : http://jsfiddle.net/NGVtK/
var d = new Date();
$("#YOUR_DATEFIELD_ID").datepicker({ 
    minDate: 0,
    maxDate: new Date(d.getFullYear(), d.getMonth() +6, d.getDate())
});

Open in new window

0
 

Author Comment

by:Gangadhara Melukote
ID: 38765854
Thanks leakim971. This worked good!!
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38766601
so close the question... :(
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question