2010-12-30 7 views

答えて

1

私がお答えしようとするでしょう:

開始するためにどのようにして見つけることができます - here

をあなたがtheese必要があります。それらをリンクする(をあなたのページの一番上)

  1. のjQueryライブラリ:。。日付ピッカーはjQueryのを含む必要があり
  2. のJavaScript:ui.core.jsと
  3. CSSテーマをui.datepicker.js:あなたは基礎についての素晴らしいデモを見つけることができThemeRollerの

とあなたのテーマを作成する - here

<script> 
$(function() { 
    /*function that makes appear datepicker + you add option to disable Weekends*/ 
    $(".selector").datepicker({ beforeShowDay: $.datepicker.noWeekends }) 
}); 
</script> 

<div id="demo"> 
    <p>Date: <input class="selector" type="text"></p> //input field that calls the function 
</div> 

2観光スポット:

  1. リンクjquery.js + ui.core .jsと ui.datepicker.js +あなたのCSSテーマを ページに追加
  2. このコードを ウェブページに貼り付けてください。

私が行ったようにあなたが行うことをお勧めすることができます - 実行は、チュートリアルの多くを投げ、そして最も重要なことは何をする - 実験を!

2
var holidays= ["2014-7-30","2015-07-29","2013-03-16"] 

$('input').datepicker({ 
beforeShowDay: function(date){ 
    var string = jQuery.datepicker.formatDate('yy-mm-dd', date); 
    var noWeekend = $.datepicker.noWeekends(date); 
     if (noWeekend[0]) { 
     return [$.inArray(string, holidays) == -1]; 
     } 
     else 
     return noWeekend; 
    } 
}); 
関連する問題