Hi friends,
Not known to many, jQuery UI DatePicker has a built-in function called 'noWeekends', that prevents users from selecting weekends, by disabling them.
Here’s how to use it
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link rel="Stylesheet" type="text/css" href="http://ajax.googleapis. com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" /> <script type="text/javascript" src="http://ajax.microsoft.com/ajax/ jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jqueryui/1.8.2/jquery-ui.min.js"></script> <script type="text/javascript"> $(function() { $("#datepic").datepicker( { beforeShowDay: $.datepicker.noWeekends } ); }); </script> </head> <body> <input id="datepic"/> </body> </html>
it's very use full 'n simple ,i hope it helps u some way
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment