Solved

How do I block out days in Jquery calendar

Posted on 2010-08-19
4
394 Views
Last Modified: 2012-06-22
I am using the code attached to include a jquery calendar in my clients app.  The client wants to block out the next two weeks (10 days)so users can't try to place rush jobs.  Can I do this without pulling the jquery code into the web space?  If so, who do I do it?
<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>

<!--<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/excite-bike/jquery-ui.css" type="text/css" rel="Stylesheet" />-->

<link href="css/excite-bike/jquery-ui.css" type="text/css" rel="Stylesheet" />





<script type="text/javascript">

//google.load('jquery', '1.3.2');

//google.load("jqueryui", "1.7.2");



	$(function() {

		$("#Q_106").datepicker();

        $("#Q_63").datepicker();

		$("#Q_158").datepicker();

	});

	

	</script>

Open in new window

0
Comment
Question by:justmelat
  • 3
4 Comments
 
LVL 16

Accepted Solution

by:
JF0 earned 500 total points
Comment Utility
    From the documentation:
Set a minimum selectable date via a Date object or as a string in the current dateFormat,  or a number of days from today (e.g. +7) or a string of values and  periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days,  e.g. '-1y -1m'), or null for no limit.          

Initialize a datepicker with the minDate option specified.  $( ".selector" ).datepicker({ minDate: new Date(2007, 1 - 1, 1) });

So in your case:
$("#Q_106").datepicker({ minDate: new Date(+14) });

0
 
LVL 1

Author Comment

by:justmelat
Comment Utility
Hi JF0

I tried this:

So in your case:
$("#Q_106").datepicker({ minDate: new Date(+14) });

But I am still able to pick any dates, even the next day
0
 
LVL 1

Author Comment

by:justmelat
Comment Utility
got it JF0

this work:  $("#Q_106").datepicker({ minDate: '5'});

Thanks so much for your help.  I would not have figured it out without your info.
0
 
LVL 1

Author Closing Comment

by:justmelat
Comment Utility
na
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now