<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jQuery UI &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/jquery-ui/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Thu, 12 Nov 2015 06:28:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>jQuery UI &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Disable Dates In Datepicker</title>
		<link>https://www.sibeeshpassion.com/disable-dates-in-datepicker/</link>
					<comments>https://www.sibeeshpassion.com/disable-dates-in-datepicker/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 12 Nov 2015 06:28:23 +0000</pubDate>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[Datepicker]]></category>
		<category><![CDATA[Disable Dates]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=10962</guid>

					<description><![CDATA[In this post we will see how we can disable some dates in a jQuery datepicker control. We all worked in datepicker controls right? But in some situations we may need to add some validations like to restrict some dates in the picker so that user can not select those and move further. Here we are going to disable all the future Saturdays. I hope you will like this. Using the code The first thing you need to do is including the needed files. jQuery jQuery UI jQuery UI CSS Once you are done adding the files, you need to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post we will see how we can disable some dates in a <a href="http://sibeeshpassion.com/category/jquery" target="_blank">jQuery </a>datepicker control. We all worked in datepicker controls right? But in some situations we may need to add some validations like to restrict some dates in the picker so that user can not select those and move further. Here we are going to disable all the future Saturdays. I hope you will like this. </p>
<p><strong>Using the code</strong></p>
<p>The first thing you need to do is including the needed files. </p>
<p><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" target="_blank">jQuery</a></p>
<p><a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js" target="_blank">jQuery UI</a></p>
<p><a href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css" target="_blank">jQuery UI CSS</a></p>
<p>Once you are done adding the files, you need to add a text box in which we are going to implement the picker. </p>
<p>[html]<br />
&lt;input type=&quot;text&quot; value=&quot;Select Date Here&quot;/&gt;<br />
[/html]</p>
<p>Now we will create an array which contains the list of dates we need to disable.</p>
<p>[js]<br />
var disabledDates = [&quot;2015-11-28&quot;,&quot;2015-11-14&quot;,&quot;2015-11-21&quot;]<br />
[/js]</p>
<p>Next we will load the datepicker to our text box.</p>
<p>[js]<br />
$(&#8216;input&#8217;).datepicker({<br />
    beforeShowDay: function(date){<br />
        var string = jQuery.datepicker.formatDate(&#8216;yy-mm-dd&#8217;, date);<br />
        return [ disabledDates.indexOf(string) == -1 ]<br />
    }<br />
});<br />
[/js]</p>
<p>Have you noticed that we are calling a function beforeShowDay, this is used to disable the dates. It will return false if the date exists in the disabledDates.</p>
<p>That&#8217;s all we have done it. </p>
<p>Please see the jsfiddle here: <a href="http://jsfiddle.net/sibeeshvenu/gj90f1bm/" target="_blank">Disable Date In DatePicker</a></p>
<p><strong>Output</strong></p>
<div id="attachment_10964" style="width: 333px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2015/11/Disable_Dates_in_Datepicker.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-10964" src="http://sibeeshpassion.com/wp-content/uploads/2015/11/Disable_Dates_in_Datepicker.png" alt="Disable Dates In Datepicker" width="323" height="278" class="size-full wp-image-10964" srcset="/wp-content/uploads/2015/11/Disable_Dates_in_Datepicker.png 323w, /wp-content/uploads/2015/11/Disable_Dates_in_Datepicker-300x258.png 300w" sizes="(max-width: 323px) 100vw, 323px" /></a><p id="caption-attachment-10964" class="wp-caption-text">Disable Dates In Datepicker</p></div>
<p><strong>Conclusion</strong></p>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<p><strong>Your turn. What do you think?</strong></p>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/disable-dates-in-datepicker/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
